parent
7bb560f9b1
commit
eb6567bb39
@ -0,0 +1,152 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.security.UserCenter; |
||||
import com.hai.common.utils.RedisUtil; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.entity.HighCompanyAccount; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.model.UserInfoModel; |
||||
import com.hai.service.HighCompanyAccountRecordService; |
||||
import com.hai.service.HighCompanyAccountService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.dao.DeadlockLoserDataAccessException; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.math.BigDecimal; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
@Controller |
||||
@RequestMapping(value = "/companyAccount") |
||||
@Api(value = "代理商接口") |
||||
public class HighCompanyAmountController { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(HighCompanyAmountController.class); |
||||
|
||||
@Resource |
||||
private HighCompanyAccountService companyAccountService; |
||||
|
||||
@Resource |
||||
private HighCompanyAccountRecordService companyAccountRecordService; |
||||
|
||||
@Resource |
||||
private RedisUtil redisUtil; |
||||
|
||||
@Resource |
||||
private UserCenter userCenter; |
||||
|
||||
@RequestMapping(value = "/recharge", method = RequestMethod.POST) |
||||
@ResponseBody |
||||
@ApiOperation(value = "余额充值") |
||||
public ResponseData recharge(@RequestBody JSONObject body) { |
||||
try { |
||||
|
||||
if (body.getLong("orgId") == null |
||||
|| body.getBigDecimal("amount") == null |
||||
|| StringUtils.isBlank(body.getString("smsCode"))) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
||||
} |
||||
|
||||
if (body.getBigDecimal("amount").compareTo(new BigDecimal("0")) == -1) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "充值金额不能小于0"); |
||||
} |
||||
|
||||
if (redisUtil.get("COMPANY_AMOUNT_RECHARGE_SMS_CODE") == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "验证码错误"); |
||||
} |
||||
if (!redisUtil.get("COMPANY_AMOUNT_RECHARGE_SMS_CODE").toString().equals(body.getString("smsCode"))) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "验证码错误"); |
||||
} |
||||
|
||||
companyAccountService.recharge(body.getLong("orgId"), body.getBigDecimal("amount")); |
||||
|
||||
return ResponseMsgUtil.success("操作成功"); |
||||
|
||||
} catch (DeadlockLoserDataAccessException deadlockLoserDataAccessException) { |
||||
log.error("HighActivityController -> userLottery() error!", "服务器繁忙"); |
||||
return ResponseMsgUtil.builderResponse(ErrorCode.SERVER_BUSY_ERROR.getCode(),ErrorCode.SERVER_BUSY_ERROR.getMsg(),null); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighCompanyAmountController --> recharge() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "/getAccountRecordList", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询账户记录列表") |
||||
public ResponseData getAccountRecordList(@RequestParam(name = "companyId", required = false) Long companyId, |
||||
@RequestParam(name = "orgId", required = false) Long orgId, |
||||
@RequestParam(name = "type", required = false) Integer type, |
||||
@RequestParam(name = "sourceType", required = false) Integer sourceType, |
||||
@RequestParam(name = "createTimeS", required = false) Long createTimeS, |
||||
@RequestParam(name = "createTimeE", required = false) Long createTimeE, |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
||||
try { |
||||
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); |
||||
if (userInfoModel == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); |
||||
} |
||||
|
||||
Map<String, Object> param = new HashMap<>(); |
||||
param.put("type", type); |
||||
param.put("sourceType", sourceType); |
||||
param.put("createTimeS", createTimeS); |
||||
param.put("createTimeE", createTimeE); |
||||
|
||||
if (userInfoModel.getBsCompany() != null && userInfoModel.getSecUser().getAdminFlag() == 1) { |
||||
param.put("companyId", userInfoModel.getBsCompany().getId()); |
||||
param.put("orgId", orgId); |
||||
} else if (userInfoModel.getBsCompany() != null && userInfoModel.getSecUser().getAdminFlag() == 0) { |
||||
param.put("orgId", userInfoModel.getBsOrganization().getId()); |
||||
} |
||||
|
||||
PageHelper.startPage(pageNum, pageSize); |
||||
return ResponseMsgUtil.success(new PageInfo<>(companyAccountRecordService.getRecordList(param))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighCompanyAmountController --> getAccountRecordList() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "/getAccount", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询账户") |
||||
public ResponseData getAccount() { |
||||
try { |
||||
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); |
||||
if (userInfoModel == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); |
||||
} |
||||
|
||||
Map<String, Object> map = new HashMap<>(); |
||||
// 查询公司账户
|
||||
HighCompanyAccount account = companyAccountService.getAccountByOrgId(userInfoModel.getBsOrganization().getId()); |
||||
if (account == null) { |
||||
map.put("amounts", 0); |
||||
} else { |
||||
map.put("amounts", account.getAmounts()); |
||||
} |
||||
return ResponseMsgUtil.success(map); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighCompanyAmountController --> getAccountRecordList() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,205 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.fasterxml.jackson.databind.ObjectMapper; |
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.security.VerifyCode; |
||||
import com.hai.common.security.VerifyCodeStorage; |
||||
import com.hai.common.utils.HttpsUtils; |
||||
import com.hai.common.utils.RedisUtil; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.entity.BsOrganization; |
||||
import com.hai.model.MtSmsMessageModel; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.service.BsCompanyService; |
||||
import com.hai.service.BsOrganizationService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.apache.http.HttpHeaders; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.net.ssl.*; |
||||
import java.io.*; |
||||
import java.math.BigDecimal; |
||||
import java.net.URL; |
||||
import java.security.MessageDigest; |
||||
import java.security.NoSuchAlgorithmException; |
||||
import java.security.cert.CertificateException; |
||||
import java.security.cert.X509Certificate; |
||||
import java.util.*; |
||||
|
||||
|
||||
@Controller |
||||
@Api(value = "华为云短信发送") |
||||
@RequestMapping(value = "/sendSms") |
||||
public class SendSmsController { |
||||
|
||||
private static final String[] HEX_DIGITS = {"0" ,"1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"}; |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(CmsContentController.class); |
||||
|
||||
/** |
||||
* 设置不验证主机 |
||||
*/ |
||||
private static final HostnameVerifier DO_NOT_VERIFY = new HostnameVerifier() { |
||||
@Override |
||||
public boolean verify(String hostname, SSLSession session) { |
||||
return true; |
||||
} |
||||
}; |
||||
|
||||
@Resource |
||||
private RedisUtil redisUtil; |
||||
|
||||
@Resource |
||||
private BsOrganizationService organizationService; |
||||
|
||||
@RequestMapping(value = "/sendRechargeSmsCode", method = RequestMethod.GET) |
||||
@ApiOperation(value = "发送充值短信验证码") |
||||
@ResponseBody |
||||
public ResponseData sendRechargeSmsCode(@RequestParam(value = "phone", required = true) String phone, |
||||
@RequestParam(value = "orgId", required = true) Long orgId, |
||||
@RequestParam(value = "price", required = true) BigDecimal price) { |
||||
try { |
||||
// 查询部门信息
|
||||
BsOrganization organization = organizationService.findById(orgId); |
||||
if (organization == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到部门信息"); |
||||
} |
||||
|
||||
VerifyCode verifyCode = VerifyCodeStorage.getDate(phone); |
||||
String smsCode = String.valueOf(new Random().nextInt(899999) + 100000); |
||||
|
||||
// ip:port根据实际情况填写
|
||||
String url = "https://139.9.32.119:18312/common/sms/sendTemplateMessage"; |
||||
String msisdn = phone; |
||||
String smsTemplateId = "SMS_22041400005"; |
||||
Map<String, String> templateParas = new HashMap<String, String>(); |
||||
templateParas.put("name", organization.getName()); |
||||
templateParas.put("price", "¥" + price.toString()); |
||||
templateParas.put("code", smsCode); |
||||
String account = "760887"; //实际账号
|
||||
String password = "Z.o'&mO%7_?5M,Br"; //实际密码
|
||||
|
||||
// If the request body does not contain the signature name, set signature to null.
|
||||
Map<String, Object> body = buildRequestBody(msisdn, smsTemplateId, templateParas, account, password); |
||||
if (null == body || body.isEmpty()) { |
||||
return ResponseMsgUtil.success(""); |
||||
} |
||||
|
||||
HttpsURLConnection connection = null; |
||||
InputStream is = null; |
||||
BufferedReader br = null; |
||||
trustAllHttpsCertificates(); |
||||
try { |
||||
URL realUrl = new URL(url); |
||||
connection = (HttpsURLConnection) realUrl.openConnection(); |
||||
connection.setHostnameVerifier(DO_NOT_VERIFY); |
||||
connection.setDoInput(true); // 设置可输入
|
||||
connection.setDoOutput(true); // 设置该连接是可以输出的
|
||||
connection.setRequestMethod("POST"); // 设置请求方式
|
||||
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8"); |
||||
// connection.connect();
|
||||
ObjectMapper objectMapper = new ObjectMapper(); |
||||
PrintWriter pw = new PrintWriter(new OutputStreamWriter(connection.getOutputStream(), "UTF-8")); |
||||
pw.write(objectMapper.writeValueAsString(body)); |
||||
pw.flush(); |
||||
pw.close(); |
||||
|
||||
br = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8")); |
||||
int status = connection.getResponseCode(); |
||||
if (200 == status) { // 200
|
||||
is = connection.getInputStream(); |
||||
} else { // 400/401
|
||||
is = connection.getErrorStream(); |
||||
} |
||||
br = new BufferedReader(new InputStreamReader(is, "UTF-8")); |
||||
String line = null; |
||||
StringBuilder result = new StringBuilder(); |
||||
while ((line = br.readLine()) != null) { // 读取数据
|
||||
result.append(line + ""); |
||||
} |
||||
connection.disconnect(); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} finally { |
||||
try { |
||||
if (null != is) { |
||||
is.close(); |
||||
} |
||||
if (null != br) { |
||||
br.close(); |
||||
} |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
redisUtil.set("COMPANY_AMOUNT_RECHARGE_SMS_CODE",smsCode, 60*5); |
||||
return ResponseMsgUtil.success("发送成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("CmsContentController --> sendSmsCode() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
// msisdn, smsTemplateId, paramValues, countryID
|
||||
public static Map<String, Object> buildRequestBody(String msisdn, String smsTemplateId, |
||||
Map<String, String> paramValues, String accout, String passward) { |
||||
if (null == msisdn || null == smsTemplateId || null == accout || null == passward) { |
||||
System.out.println( |
||||
"buildRequestBody(): mobiles, templateId or templateParas or account or password is null."); |
||||
return null; |
||||
} |
||||
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>(); |
||||
List<MtSmsMessageModel> requestLists = new ArrayList<MtSmsMessageModel>(); |
||||
MtSmsMessageModel mtSmsMessage = new MtSmsMessageModel(); |
||||
List<String> mobiles = new ArrayList<String>(); |
||||
mobiles.add(msisdn); |
||||
mtSmsMessage.setMobiles(mobiles); |
||||
mtSmsMessage.setTemplateId(smsTemplateId); |
||||
mtSmsMessage.setTemplateParas(paramValues); |
||||
mtSmsMessage.setSignature("【嗨森逛】"); |
||||
requestLists.add(mtSmsMessage); |
||||
map.put("account", accout); |
||||
map.put("password", passward); |
||||
map.put("requestLists", requestLists); |
||||
return map; |
||||
} |
||||
|
||||
|
||||
static void trustAllHttpsCertificates() throws Exception { |
||||
TrustManager[] trustAllCerts = new TrustManager[] { |
||||
new X509TrustManager() { |
||||
@Override |
||||
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { |
||||
return; |
||||
} |
||||
|
||||
@Override |
||||
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { |
||||
return; |
||||
} |
||||
|
||||
@Override |
||||
public X509Certificate[] getAcceptedIssuers() { |
||||
return null; |
||||
} |
||||
} |
||||
}; |
||||
SSLContext sc = SSLContext.getInstance("SSL"); |
||||
sc.init(null, trustAllCerts, null); |
||||
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); |
||||
} |
||||
} |
@ -0,0 +1,117 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighCompanyAccount; |
||||
import com.hai.entity.HighCompanyAccountExample; |
||||
import java.util.List; |
||||
import org.apache.ibatis.annotations.Delete; |
||||
import org.apache.ibatis.annotations.DeleteProvider; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.InsertProvider; |
||||
import org.apache.ibatis.annotations.Options; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.annotations.SelectProvider; |
||||
import org.apache.ibatis.annotations.Update; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface HighCompanyAccountMapper extends HighCompanyAccountMapperExt { |
||||
@SelectProvider(type=HighCompanyAccountSqlProvider.class, method="countByExample") |
||||
long countByExample(HighCompanyAccountExample example); |
||||
|
||||
@DeleteProvider(type=HighCompanyAccountSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighCompanyAccountExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_company_account", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_company_account (company_id, org_id, ", |
||||
"amounts, `status`, ", |
||||
"create_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{companyId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT}, ", |
||||
"#{amounts,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighCompanyAccount record); |
||||
|
||||
@InsertProvider(type=HighCompanyAccountSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighCompanyAccount record); |
||||
|
||||
@SelectProvider(type=HighCompanyAccountSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<HighCompanyAccount> selectByExample(HighCompanyAccountExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, company_id, org_id, amounts, `status`, create_time, update_time, ext_1, ", |
||||
"ext_2, ext_3", |
||||
"from high_company_account", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
HighCompanyAccount selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighCompanyAccountSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighCompanyAccount record, @Param("example") HighCompanyAccountExample example); |
||||
|
||||
@UpdateProvider(type=HighCompanyAccountSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighCompanyAccount record, @Param("example") HighCompanyAccountExample example); |
||||
|
||||
@UpdateProvider(type=HighCompanyAccountSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighCompanyAccount record); |
||||
|
||||
@Update({ |
||||
"update high_company_account", |
||||
"set company_id = #{companyId,jdbcType=BIGINT},", |
||||
"org_id = #{orgId,jdbcType=BIGINT},", |
||||
"amounts = #{amounts,jdbcType=DECIMAL},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(HighCompanyAccount record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighCompanyAccountMapperExt { |
||||
} |
@ -0,0 +1,158 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighCompanyAccountRecord; |
||||
import com.hai.entity.HighCompanyAccountRecordExample; |
||||
import java.util.List; |
||||
import org.apache.ibatis.annotations.Delete; |
||||
import org.apache.ibatis.annotations.DeleteProvider; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.InsertProvider; |
||||
import org.apache.ibatis.annotations.Options; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.annotations.SelectProvider; |
||||
import org.apache.ibatis.annotations.Update; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface HighCompanyAccountRecordMapper extends HighCompanyAccountRecordMapperExt { |
||||
@SelectProvider(type=HighCompanyAccountRecordSqlProvider.class, method="countByExample") |
||||
long countByExample(HighCompanyAccountRecordExample example); |
||||
|
||||
@DeleteProvider(type=HighCompanyAccountRecordSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighCompanyAccountRecordExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_company_account_record", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_company_account_record (company_amount_id, company_id, ", |
||||
"company_name, org_id, ", |
||||
"org_name, `type`, amount, ", |
||||
"before_amount, after_amount, ", |
||||
"source_type, source_id, ", |
||||
"source_content, `status`, ", |
||||
"create_time, op_user_id, ", |
||||
"op_user_name, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values (#{companyAmountId,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, ", |
||||
"#{companyName,jdbcType=VARCHAR}, #{orgId,jdbcType=BIGINT}, ", |
||||
"#{orgName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, ", |
||||
"#{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL}, ", |
||||
"#{sourceType,jdbcType=INTEGER}, #{sourceId,jdbcType=BIGINT}, ", |
||||
"#{sourceContent,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{opUserId,jdbcType=BIGINT}, ", |
||||
"#{opUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", |
||||
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighCompanyAccountRecord record); |
||||
|
||||
@InsertProvider(type=HighCompanyAccountRecordSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighCompanyAccountRecord record); |
||||
|
||||
@SelectProvider(type=HighCompanyAccountRecordSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_amount_id", property="companyAmountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<HighCompanyAccountRecord> selectByExample(HighCompanyAccountRecordExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, company_amount_id, company_id, company_name, org_id, org_name, `type`, amount, ", |
||||
"before_amount, after_amount, source_type, source_id, source_content, `status`, ", |
||||
"create_time, op_user_id, op_user_name, ext_1, ext_2, ext_3", |
||||
"from high_company_account_record", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_amount_id", property="companyAmountId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
HighCompanyAccountRecord selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighCompanyAccountRecordSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighCompanyAccountRecord record, @Param("example") HighCompanyAccountRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighCompanyAccountRecordSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighCompanyAccountRecord record, @Param("example") HighCompanyAccountRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighCompanyAccountRecordSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighCompanyAccountRecord record); |
||||
|
||||
@Update({ |
||||
"update high_company_account_record", |
||||
"set company_amount_id = #{companyAmountId,jdbcType=BIGINT},", |
||||
"company_id = #{companyId,jdbcType=BIGINT},", |
||||
"company_name = #{companyName,jdbcType=VARCHAR},", |
||||
"org_id = #{orgId,jdbcType=BIGINT},", |
||||
"org_name = #{orgName,jdbcType=VARCHAR},", |
||||
"`type` = #{type,jdbcType=INTEGER},", |
||||
"amount = #{amount,jdbcType=DECIMAL},", |
||||
"before_amount = #{beforeAmount,jdbcType=DECIMAL},", |
||||
"after_amount = #{afterAmount,jdbcType=DECIMAL},", |
||||
"source_type = #{sourceType,jdbcType=INTEGER},", |
||||
"source_id = #{sourceId,jdbcType=BIGINT},", |
||||
"source_content = #{sourceContent,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"op_user_id = #{opUserId,jdbcType=BIGINT},", |
||||
"op_user_name = #{opUserName,jdbcType=VARCHAR},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(HighCompanyAccountRecord record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighCompanyAccountRecordMapperExt { |
||||
} |
@ -0,0 +1,444 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighCompanyAccountRecord; |
||||
import com.hai.entity.HighCompanyAccountRecordExample.Criteria; |
||||
import com.hai.entity.HighCompanyAccountRecordExample.Criterion; |
||||
import com.hai.entity.HighCompanyAccountRecordExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighCompanyAccountRecordSqlProvider { |
||||
|
||||
public String countByExample(HighCompanyAccountRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_company_account_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighCompanyAccountRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_company_account_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighCompanyAccountRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_company_account_record"); |
||||
|
||||
if (record.getCompanyAmountId() != null) { |
||||
sql.VALUES("company_amount_id", "#{companyAmountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyName() != null) { |
||||
sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgName() != null) { |
||||
sql.VALUES("org_name", "#{orgName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.VALUES("before_amount", "#{beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.VALUES("after_amount", "#{afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.VALUES("source_content", "#{sourceContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpUserId() != null) { |
||||
sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.VALUES("op_user_name", "#{opUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighCompanyAccountRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("company_amount_id"); |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("company_name"); |
||||
sql.SELECT("org_id"); |
||||
sql.SELECT("org_name"); |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("amount"); |
||||
sql.SELECT("before_amount"); |
||||
sql.SELECT("after_amount"); |
||||
sql.SELECT("source_type"); |
||||
sql.SELECT("source_id"); |
||||
sql.SELECT("source_content"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("op_user_id"); |
||||
sql.SELECT("op_user_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_company_account_record"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
HighCompanyAccountRecord record = (HighCompanyAccountRecord) parameter.get("record"); |
||||
HighCompanyAccountRecordExample example = (HighCompanyAccountRecordExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_account_record"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyAmountId() != null) { |
||||
sql.SET("company_amount_id = #{record.companyAmountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyName() != null) { |
||||
sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgName() != null) { |
||||
sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpUserId() != null) { |
||||
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_account_record"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("company_amount_id = #{record.companyAmountId,jdbcType=BIGINT}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); |
||||
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); |
||||
sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); |
||||
sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighCompanyAccountRecordExample example = (HighCompanyAccountRecordExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighCompanyAccountRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_account_record"); |
||||
|
||||
if (record.getCompanyAmountId() != null) { |
||||
sql.SET("company_amount_id = #{companyAmountId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyName() != null) { |
||||
sql.SET("company_name = #{companyName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgName() != null) { |
||||
sql.SET("org_name = #{orgName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.SET("before_amount = #{beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.SET("after_amount = #{afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.SET("source_type = #{sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.SET("source_id = #{sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.SET("source_content = #{sourceContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpUserId() != null) { |
||||
sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.SET("op_user_name = #{opUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighCompanyAccountRecordExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,304 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighCompanyAccount; |
||||
import com.hai.entity.HighCompanyAccountExample.Criteria; |
||||
import com.hai.entity.HighCompanyAccountExample.Criterion; |
||||
import com.hai.entity.HighCompanyAccountExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighCompanyAccountSqlProvider { |
||||
|
||||
public String countByExample(HighCompanyAccountExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_company_account"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighCompanyAccountExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_company_account"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighCompanyAccount record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_company_account"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getAmounts() != null) { |
||||
sql.VALUES("amounts", "#{amounts,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighCompanyAccountExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("org_id"); |
||||
sql.SELECT("amounts"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_company_account"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
HighCompanyAccount record = (HighCompanyAccount) parameter.get("record"); |
||||
HighCompanyAccountExample example = (HighCompanyAccountExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_account"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getAmounts() != null) { |
||||
sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_account"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighCompanyAccountExample example = (HighCompanyAccountExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighCompanyAccount record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_account"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getAmounts() != null) { |
||||
sql.SET("amounts = #{amounts,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighCompanyAccountExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,117 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighCompanyTwoPwd; |
||||
import com.hai.entity.HighCompanyTwoPwdExample; |
||||
import java.util.List; |
||||
import org.apache.ibatis.annotations.Delete; |
||||
import org.apache.ibatis.annotations.DeleteProvider; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.InsertProvider; |
||||
import org.apache.ibatis.annotations.Options; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.annotations.SelectProvider; |
||||
import org.apache.ibatis.annotations.Update; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface HighCompanyTwoPwdMapper extends HighCompanyTwoPwdMapperExt { |
||||
@SelectProvider(type=HighCompanyTwoPwdSqlProvider.class, method="countByExample") |
||||
long countByExample(HighCompanyTwoPwdExample example); |
||||
|
||||
@DeleteProvider(type=HighCompanyTwoPwdSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighCompanyTwoPwdExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_company_two_pwd", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_company_two_pwd (company_id, org_id, ", |
||||
"`password`, `status`, ", |
||||
"create_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{companyId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT}, ", |
||||
"#{password,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighCompanyTwoPwd record); |
||||
|
||||
@InsertProvider(type=HighCompanyTwoPwdSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighCompanyTwoPwd record); |
||||
|
||||
@SelectProvider(type=HighCompanyTwoPwdSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="password", property="password", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<HighCompanyTwoPwd> selectByExample(HighCompanyTwoPwdExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, company_id, org_id, `password`, `status`, create_time, update_time, ext_1, ", |
||||
"ext_2, ext_3", |
||||
"from high_company_two_pwd", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="password", property="password", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
HighCompanyTwoPwd selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighCompanyTwoPwdSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighCompanyTwoPwd record, @Param("example") HighCompanyTwoPwdExample example); |
||||
|
||||
@UpdateProvider(type=HighCompanyTwoPwdSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighCompanyTwoPwd record, @Param("example") HighCompanyTwoPwdExample example); |
||||
|
||||
@UpdateProvider(type=HighCompanyTwoPwdSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighCompanyTwoPwd record); |
||||
|
||||
@Update({ |
||||
"update high_company_two_pwd", |
||||
"set company_id = #{companyId,jdbcType=BIGINT},", |
||||
"org_id = #{orgId,jdbcType=BIGINT},", |
||||
"`password` = #{password,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(HighCompanyTwoPwd record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighCompanyTwoPwdMapperExt { |
||||
} |
@ -0,0 +1,304 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighCompanyTwoPwd; |
||||
import com.hai.entity.HighCompanyTwoPwdExample.Criteria; |
||||
import com.hai.entity.HighCompanyTwoPwdExample.Criterion; |
||||
import com.hai.entity.HighCompanyTwoPwdExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighCompanyTwoPwdSqlProvider { |
||||
|
||||
public String countByExample(HighCompanyTwoPwdExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_company_two_pwd"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighCompanyTwoPwdExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_company_two_pwd"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighCompanyTwoPwd record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_company_two_pwd"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getPassword() != null) { |
||||
sql.VALUES("`password`", "#{password,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighCompanyTwoPwdExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("org_id"); |
||||
sql.SELECT("`password`"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_company_two_pwd"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
HighCompanyTwoPwd record = (HighCompanyTwoPwd) parameter.get("record"); |
||||
HighCompanyTwoPwdExample example = (HighCompanyTwoPwdExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_two_pwd"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getPassword() != null) { |
||||
sql.SET("`password` = #{record.password,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_two_pwd"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
sql.SET("`password` = #{record.password,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighCompanyTwoPwdExample example = (HighCompanyTwoPwdExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighCompanyTwoPwd record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_company_two_pwd"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getPassword() != null) { |
||||
sql.SET("`password` = #{password,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighCompanyTwoPwdExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,130 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighOilCard; |
||||
import com.hai.entity.HighOilCardExample; |
||||
import java.util.List; |
||||
import org.apache.ibatis.annotations.Delete; |
||||
import org.apache.ibatis.annotations.DeleteProvider; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.InsertProvider; |
||||
import org.apache.ibatis.annotations.Options; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.annotations.SelectProvider; |
||||
import org.apache.ibatis.annotations.Update; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface HighOilCardMapper extends HighOilCardMapperExt { |
||||
@SelectProvider(type=HighOilCardSqlProvider.class, method="countByExample") |
||||
long countByExample(HighOilCardExample example); |
||||
|
||||
@DeleteProvider(type=HighOilCardSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighOilCardExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_oil_card", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_oil_card (company_id, org_id, ", |
||||
"card_no, amount, ", |
||||
"contact_name, contact_phone, ", |
||||
"`status`, create_time, ", |
||||
"update_time, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values (#{companyId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT}, ", |
||||
"#{cardNo,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, ", |
||||
"#{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, ", |
||||
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", |
||||
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighOilCard record); |
||||
|
||||
@InsertProvider(type=HighOilCardSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighOilCard record); |
||||
|
||||
@SelectProvider(type=HighOilCardSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<HighOilCard> selectByExample(HighOilCardExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, company_id, org_id, card_no, amount, contact_name, contact_phone, `status`, ", |
||||
"create_time, update_time, ext_1, ext_2, ext_3", |
||||
"from high_oil_card", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
HighOilCard selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighOilCardSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighOilCard record, @Param("example") HighOilCardExample example); |
||||
|
||||
@UpdateProvider(type=HighOilCardSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighOilCard record, @Param("example") HighOilCardExample example); |
||||
|
||||
@UpdateProvider(type=HighOilCardSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighOilCard record); |
||||
|
||||
@Update({ |
||||
"update high_oil_card", |
||||
"set company_id = #{companyId,jdbcType=BIGINT},", |
||||
"org_id = #{orgId,jdbcType=BIGINT},", |
||||
"card_no = #{cardNo,jdbcType=VARCHAR},", |
||||
"amount = #{amount,jdbcType=DECIMAL},", |
||||
"contact_name = #{contactName,jdbcType=VARCHAR},", |
||||
"contact_phone = #{contactPhone,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(HighOilCard record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighOilCardMapperExt { |
||||
} |
@ -0,0 +1,142 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighOilCardRecord; |
||||
import com.hai.entity.HighOilCardRecordExample; |
||||
import java.util.List; |
||||
import org.apache.ibatis.annotations.Delete; |
||||
import org.apache.ibatis.annotations.DeleteProvider; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.InsertProvider; |
||||
import org.apache.ibatis.annotations.Options; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.annotations.SelectProvider; |
||||
import org.apache.ibatis.annotations.Update; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface HighOilCardRecordMapper extends HighOilCardRecordMapperExt { |
||||
@SelectProvider(type=HighOilCardRecordSqlProvider.class, method="countByExample") |
||||
long countByExample(HighOilCardRecordExample example); |
||||
|
||||
@DeleteProvider(type=HighOilCardRecordSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighOilCardRecordExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_oil_card_record", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_oil_card_record (oil_card_id, `type`, ", |
||||
"amount, before_amount, ", |
||||
"after_amount, source_type, ", |
||||
"source_id, source_content, ", |
||||
"`status`, create_time, ", |
||||
"op_user_id, op_user_name, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{oilCardId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, ", |
||||
"#{amount,jdbcType=DECIMAL}, #{beforeAmount,jdbcType=DECIMAL}, ", |
||||
"#{afterAmount,jdbcType=DECIMAL}, #{sourceType,jdbcType=INTEGER}, ", |
||||
"#{sourceId,jdbcType=BIGINT}, #{sourceContent,jdbcType=VARCHAR}, ", |
||||
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(HighOilCardRecord record); |
||||
|
||||
@InsertProvider(type=HighOilCardRecordSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighOilCardRecord record); |
||||
|
||||
@SelectProvider(type=HighOilCardRecordSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<HighOilCardRecord> selectByExample(HighOilCardRecordExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, oil_card_id, `type`, amount, before_amount, after_amount, source_type, source_id, ", |
||||
"source_content, `status`, create_time, op_user_id, op_user_name, ext_1, ext_2, ", |
||||
"ext_3", |
||||
"from high_oil_card_record", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="oil_card_id", property="oilCardId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
HighOilCardRecord selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighOilCardRecordSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighOilCardRecord record, @Param("example") HighOilCardRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighOilCardRecordSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighOilCardRecord record, @Param("example") HighOilCardRecordExample example); |
||||
|
||||
@UpdateProvider(type=HighOilCardRecordSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighOilCardRecord record); |
||||
|
||||
@Update({ |
||||
"update high_oil_card_record", |
||||
"set oil_card_id = #{oilCardId,jdbcType=BIGINT},", |
||||
"`type` = #{type,jdbcType=INTEGER},", |
||||
"amount = #{amount,jdbcType=DECIMAL},", |
||||
"before_amount = #{beforeAmount,jdbcType=DECIMAL},", |
||||
"after_amount = #{afterAmount,jdbcType=DECIMAL},", |
||||
"source_type = #{sourceType,jdbcType=INTEGER},", |
||||
"source_id = #{sourceId,jdbcType=BIGINT},", |
||||
"source_content = #{sourceContent,jdbcType=VARCHAR},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"op_user_id = #{opUserId,jdbcType=BIGINT},", |
||||
"op_user_name = #{opUserName,jdbcType=VARCHAR},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(HighOilCardRecord record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighOilCardRecordMapperExt { |
||||
} |
@ -0,0 +1,388 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighOilCardRecord; |
||||
import com.hai.entity.HighOilCardRecordExample.Criteria; |
||||
import com.hai.entity.HighOilCardRecordExample.Criterion; |
||||
import com.hai.entity.HighOilCardRecordExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighOilCardRecordSqlProvider { |
||||
|
||||
public String countByExample(HighOilCardRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_oil_card_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighOilCardRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_oil_card_record"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighOilCardRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_oil_card_record"); |
||||
|
||||
if (record.getOilCardId() != null) { |
||||
sql.VALUES("oil_card_id", "#{oilCardId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.VALUES("before_amount", "#{beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.VALUES("after_amount", "#{afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.VALUES("source_content", "#{sourceContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpUserId() != null) { |
||||
sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.VALUES("op_user_name", "#{opUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighOilCardRecordExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("oil_card_id"); |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("amount"); |
||||
sql.SELECT("before_amount"); |
||||
sql.SELECT("after_amount"); |
||||
sql.SELECT("source_type"); |
||||
sql.SELECT("source_id"); |
||||
sql.SELECT("source_content"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("op_user_id"); |
||||
sql.SELECT("op_user_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_oil_card_record"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
HighOilCardRecord record = (HighOilCardRecord) parameter.get("record"); |
||||
HighOilCardRecordExample example = (HighOilCardRecordExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_oil_card_record"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOilCardId() != null) { |
||||
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpUserId() != null) { |
||||
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_oil_card_record"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("oil_card_id = #{record.oilCardId,jdbcType=BIGINT}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); |
||||
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); |
||||
sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); |
||||
sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighOilCardRecordExample example = (HighOilCardRecordExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighOilCardRecord record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_oil_card_record"); |
||||
|
||||
if (record.getOilCardId() != null) { |
||||
sql.SET("oil_card_id = #{oilCardId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getBeforeAmount() != null) { |
||||
sql.SET("before_amount = #{beforeAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getAfterAmount() != null) { |
||||
sql.SET("after_amount = #{afterAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSourceType() != null) { |
||||
sql.SET("source_type = #{sourceType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSourceId() != null) { |
||||
sql.SET("source_id = #{sourceId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getSourceContent() != null) { |
||||
sql.SET("source_content = #{sourceContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getOpUserId() != null) { |
||||
sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOpUserName() != null) { |
||||
sql.SET("op_user_name = #{opUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighOilCardRecordExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,346 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighOilCard; |
||||
import com.hai.entity.HighOilCardExample.Criteria; |
||||
import com.hai.entity.HighOilCardExample.Criterion; |
||||
import com.hai.entity.HighOilCardExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighOilCardSqlProvider { |
||||
|
||||
public String countByExample(HighOilCardExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_oil_card"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighOilCardExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_oil_card"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighOilCard record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_oil_card"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCardNo() != null) { |
||||
sql.VALUES("card_no", "#{cardNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getContactName() != null) { |
||||
sql.VALUES("contact_name", "#{contactName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getContactPhone() != null) { |
||||
sql.VALUES("contact_phone", "#{contactPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(HighOilCardExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("company_id"); |
||||
sql.SELECT("org_id"); |
||||
sql.SELECT("card_no"); |
||||
sql.SELECT("amount"); |
||||
sql.SELECT("contact_name"); |
||||
sql.SELECT("contact_phone"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("high_oil_card"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
HighOilCard record = (HighOilCard) parameter.get("record"); |
||||
HighOilCardExample example = (HighOilCardExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_oil_card"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCardNo() != null) { |
||||
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getContactName() != null) { |
||||
sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getContactPhone() != null) { |
||||
sql.SET("contact_phone = #{record.contactPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_oil_card"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||
sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); |
||||
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}"); |
||||
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); |
||||
sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); |
||||
sql.SET("contact_phone = #{record.contactPhone,jdbcType=VARCHAR}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
HighOilCardExample example = (HighOilCardExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighOilCard record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_oil_card"); |
||||
|
||||
if (record.getCompanyId() != null) { |
||||
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrgId() != null) { |
||||
sql.SET("org_id = #{orgId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCardNo() != null) { |
||||
sql.SET("card_no = #{cardNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getAmount() != null) { |
||||
sql.SET("amount = #{amount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getContactName() != null) { |
||||
sql.SET("contact_name = #{contactName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getContactPhone() != null) { |
||||
sql.SET("contact_phone = #{contactPhone,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, HighOilCardExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,198 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_company_account |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighCompanyAccount implements Serializable { |
||||
private Long id; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Long companyId; |
||||
|
||||
/** |
||||
* 单位id |
||||
*/ |
||||
private Long orgId; |
||||
|
||||
/** |
||||
* 金额额度 |
||||
*/ |
||||
private BigDecimal amounts; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 修改时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Long companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public Long getOrgId() { |
||||
return orgId; |
||||
} |
||||
|
||||
public void setOrgId(Long orgId) { |
||||
this.orgId = orgId; |
||||
} |
||||
|
||||
public BigDecimal getAmounts() { |
||||
return amounts; |
||||
} |
||||
|
||||
public void setAmounts(BigDecimal amounts) { |
||||
this.amounts = amounts; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighCompanyAccount other = (HighCompanyAccount) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId())) |
||||
&& (this.getAmounts() == null ? other.getAmounts() == null : this.getAmounts().equals(other.getAmounts())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode()); |
||||
result = prime * result + ((getAmounts() == null) ? 0 : getAmounts().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", orgId=").append(orgId); |
||||
sb.append(", amounts=").append(amounts); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,854 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class HighCompanyAccountExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public HighCompanyAccountExample() { |
||||
oredCriteria = new ArrayList<Criteria>(); |
||||
} |
||||
|
||||
public void setOrderByClause(String orderByClause) { |
||||
this.orderByClause = orderByClause; |
||||
} |
||||
|
||||
public String getOrderByClause() { |
||||
return orderByClause; |
||||
} |
||||
|
||||
public void setDistinct(boolean distinct) { |
||||
this.distinct = distinct; |
||||
} |
||||
|
||||
public boolean isDistinct() { |
||||
return distinct; |
||||
} |
||||
|
||||
public List<Criteria> getOredCriteria() { |
||||
return oredCriteria; |
||||
} |
||||
|
||||
public void or(Criteria criteria) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
|
||||
public Criteria or() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
oredCriteria.add(criteria); |
||||
return criteria; |
||||
} |
||||
|
||||
public Criteria createCriteria() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
if (oredCriteria.size() == 0) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
return criteria; |
||||
} |
||||
|
||||
protected Criteria createCriteriaInternal() { |
||||
Criteria criteria = new Criteria(); |
||||
return criteria; |
||||
} |
||||
|
||||
public void clear() { |
||||
oredCriteria.clear(); |
||||
orderByClause = null; |
||||
distinct = false; |
||||
} |
||||
|
||||
public void setLimit(Integer limit) { |
||||
this.limit = limit; |
||||
} |
||||
|
||||
public Integer getLimit() { |
||||
return limit; |
||||
} |
||||
|
||||
public void setOffset(Long offset) { |
||||
this.offset = offset; |
||||
} |
||||
|
||||
public Long getOffset() { |
||||
return offset; |
||||
} |
||||
|
||||
protected abstract static class GeneratedCriteria { |
||||
protected List<Criterion> criteria; |
||||
|
||||
protected GeneratedCriteria() { |
||||
super(); |
||||
criteria = new ArrayList<Criterion>(); |
||||
} |
||||
|
||||
public boolean isValid() { |
||||
return criteria.size() > 0; |
||||
} |
||||
|
||||
public List<Criterion> getAllCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
public List<Criterion> getCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
protected void addCriterion(String condition) { |
||||
if (condition == null) { |
||||
throw new RuntimeException("Value for condition cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value, String property) { |
||||
if (value == null) { |
||||
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
if (value1 == null || value2 == null) { |
||||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value1, value2)); |
||||
} |
||||
|
||||
public Criteria andIdIsNull() { |
||||
addCriterion("id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIsNotNull() { |
||||
addCriterion("id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdEqualTo(Long value) { |
||||
addCriterion("id =", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotEqualTo(Long value) { |
||||
addCriterion("id <>", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThan(Long value) { |
||||
addCriterion("id >", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("id >=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThan(Long value) { |
||||
addCriterion("id <", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("id <=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIn(List<Long> values) { |
||||
addCriterion("id in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotIn(List<Long> values) { |
||||
addCriterion("id not in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) { |
||||
addCriterion("id between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("id not between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdIsNull() { |
||||
addCriterion("company_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdIsNotNull() { |
||||
addCriterion("company_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdEqualTo(Long value) { |
||||
addCriterion("company_id =", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdNotEqualTo(Long value) { |
||||
addCriterion("company_id <>", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdGreaterThan(Long value) { |
||||
addCriterion("company_id >", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("company_id >=", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdLessThan(Long value) { |
||||
addCriterion("company_id <", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("company_id <=", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdIn(List<Long> values) { |
||||
addCriterion("company_id in", values, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdNotIn(List<Long> values) { |
||||
addCriterion("company_id not in", values, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdBetween(Long value1, Long value2) { |
||||
addCriterion("company_id between", value1, value2, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("company_id not between", value1, value2, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdIsNull() { |
||||
addCriterion("org_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdIsNotNull() { |
||||
addCriterion("org_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdEqualTo(Long value) { |
||||
addCriterion("org_id =", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdNotEqualTo(Long value) { |
||||
addCriterion("org_id <>", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdGreaterThan(Long value) { |
||||
addCriterion("org_id >", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("org_id >=", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdLessThan(Long value) { |
||||
addCriterion("org_id <", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("org_id <=", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdIn(List<Long> values) { |
||||
addCriterion("org_id in", values, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdNotIn(List<Long> values) { |
||||
addCriterion("org_id not in", values, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdBetween(Long value1, Long value2) { |
||||
addCriterion("org_id between", value1, value2, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("org_id not between", value1, value2, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsIsNull() { |
||||
addCriterion("amounts is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsIsNotNull() { |
||||
addCriterion("amounts is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsEqualTo(BigDecimal value) { |
||||
addCriterion("amounts =", value, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsNotEqualTo(BigDecimal value) { |
||||
addCriterion("amounts <>", value, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsGreaterThan(BigDecimal value) { |
||||
addCriterion("amounts >", value, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsGreaterThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("amounts >=", value, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsLessThan(BigDecimal value) { |
||||
addCriterion("amounts <", value, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsLessThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("amounts <=", value, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsIn(List<BigDecimal> values) { |
||||
addCriterion("amounts in", values, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsNotIn(List<BigDecimal> values) { |
||||
addCriterion("amounts not in", values, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("amounts between", value1, value2, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andAmountsNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("amounts not between", value1, value2, "amounts"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNull() { |
||||
addCriterion("`status` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNotNull() { |
||||
addCriterion("`status` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusEqualTo(Integer value) { |
||||
addCriterion("`status` =", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) { |
||||
addCriterion("`status` <>", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) { |
||||
addCriterion("`status` >", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` >=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThan(Integer value) { |
||||
addCriterion("`status` <", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` <=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIn(List<Integer> values) { |
||||
addCriterion("`status` in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) { |
||||
addCriterion("`status` not in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` not between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNull() { |
||||
addCriterion("create_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNotNull() { |
||||
addCriterion("create_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) { |
||||
addCriterion("create_time =", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) { |
||||
addCriterion("create_time <>", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) { |
||||
addCriterion("create_time >", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("create_time >=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) { |
||||
addCriterion("create_time <", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("create_time <=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) { |
||||
addCriterion("create_time in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) { |
||||
addCriterion("create_time not in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("create_time between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("create_time not between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNull() { |
||||
addCriterion("update_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNotNull() { |
||||
addCriterion("update_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) { |
||||
addCriterion("update_time =", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
||||
addCriterion("update_time <>", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) { |
||||
addCriterion("update_time >", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("update_time >=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) { |
||||
addCriterion("update_time <", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("update_time <=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) { |
||||
addCriterion("update_time in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
||||
addCriterion("update_time not in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("update_time between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("update_time not between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNull() { |
||||
addCriterion("ext_1 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNotNull() { |
||||
addCriterion("ext_1 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1EqualTo(String value) { |
||||
addCriterion("ext_1 =", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotEqualTo(String value) { |
||||
addCriterion("ext_1 <>", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThan(String value) { |
||||
addCriterion("ext_1 >", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 >=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThan(String value) { |
||||
addCriterion("ext_1 <", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 <=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Like(String value) { |
||||
addCriterion("ext_1 like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotLike(String value) { |
||||
addCriterion("ext_1 not like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1In(List<String> values) { |
||||
addCriterion("ext_1 in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotIn(List<String> values) { |
||||
addCriterion("ext_1 not in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Between(String value1, String value2) { |
||||
addCriterion("ext_1 between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotBetween(String value1, String value2) { |
||||
addCriterion("ext_1 not between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNull() { |
||||
addCriterion("ext_2 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNotNull() { |
||||
addCriterion("ext_2 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2EqualTo(String value) { |
||||
addCriterion("ext_2 =", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotEqualTo(String value) { |
||||
addCriterion("ext_2 <>", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThan(String value) { |
||||
addCriterion("ext_2 >", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 >=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThan(String value) { |
||||
addCriterion("ext_2 <", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 <=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Like(String value) { |
||||
addCriterion("ext_2 like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotLike(String value) { |
||||
addCriterion("ext_2 not like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2In(List<String> values) { |
||||
addCriterion("ext_2 in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotIn(List<String> values) { |
||||
addCriterion("ext_2 not in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Between(String value1, String value2) { |
||||
addCriterion("ext_2 between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotBetween(String value1, String value2) { |
||||
addCriterion("ext_2 not between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNull() { |
||||
addCriterion("ext_3 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNotNull() { |
||||
addCriterion("ext_3 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3EqualTo(String value) { |
||||
addCriterion("ext_3 =", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotEqualTo(String value) { |
||||
addCriterion("ext_3 <>", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThan(String value) { |
||||
addCriterion("ext_3 >", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 >=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThan(String value) { |
||||
addCriterion("ext_3 <", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 <=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Like(String value) { |
||||
addCriterion("ext_3 like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotLike(String value) { |
||||
addCriterion("ext_3 not like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3In(List<String> values) { |
||||
addCriterion("ext_3 in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotIn(List<String> values) { |
||||
addCriterion("ext_3 not in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Between(String value1, String value2) { |
||||
addCriterion("ext_3 between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotBetween(String value1, String value2) { |
||||
addCriterion("ext_3 not between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
*/ |
||||
public static class Criteria extends GeneratedCriteria { |
||||
|
||||
protected Criteria() { |
||||
super(); |
||||
} |
||||
} |
||||
|
||||
public static class Criterion { |
||||
private String condition; |
||||
|
||||
private Object value; |
||||
|
||||
private Object secondValue; |
||||
|
||||
private boolean noValue; |
||||
|
||||
private boolean singleValue; |
||||
|
||||
private boolean betweenValue; |
||||
|
||||
private boolean listValue; |
||||
|
||||
private String typeHandler; |
||||
|
||||
public String getCondition() { |
||||
return condition; |
||||
} |
||||
|
||||
public Object getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public Object getSecondValue() { |
||||
return secondValue; |
||||
} |
||||
|
||||
public boolean isNoValue() { |
||||
return noValue; |
||||
} |
||||
|
||||
public boolean isSingleValue() { |
||||
return singleValue; |
||||
} |
||||
|
||||
public boolean isBetweenValue() { |
||||
return betweenValue; |
||||
} |
||||
|
||||
public boolean isListValue() { |
||||
return listValue; |
||||
} |
||||
|
||||
public String getTypeHandler() { |
||||
return typeHandler; |
||||
} |
||||
|
||||
protected Criterion(String condition) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.typeHandler = null; |
||||
this.noValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.typeHandler = typeHandler; |
||||
if (value instanceof List<?>) { |
||||
this.listValue = true; |
||||
} else { |
||||
this.singleValue = true; |
||||
} |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value) { |
||||
this(condition, value, null); |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.secondValue = secondValue; |
||||
this.typeHandler = typeHandler; |
||||
this.betweenValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) { |
||||
this(condition, value, secondValue, null); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,358 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_company_account_record |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighCompanyAccountRecord implements Serializable { |
||||
private Long id; |
||||
|
||||
/** |
||||
* 公司金额表id |
||||
*/ |
||||
private Long companyAmountId; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Long companyId; |
||||
|
||||
/** |
||||
* 公司名称 |
||||
*/ |
||||
private String companyName; |
||||
|
||||
/** |
||||
* 单位id |
||||
*/ |
||||
private Long orgId; |
||||
|
||||
/** |
||||
* 单位名称 |
||||
*/ |
||||
private String orgName; |
||||
|
||||
/** |
||||
* 类型 1:进账 2:出账 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 金额 |
||||
*/ |
||||
private BigDecimal amount; |
||||
|
||||
/** |
||||
* 变更前金额 |
||||
*/ |
||||
private BigDecimal beforeAmount; |
||||
|
||||
/** |
||||
* 变更后金额 |
||||
*/ |
||||
private BigDecimal afterAmount; |
||||
|
||||
/** |
||||
* 来源类型 1.金额充值 2. 油卡充值 |
||||
*/ |
||||
private Integer sourceType; |
||||
|
||||
/** |
||||
* 来源id |
||||
*/ |
||||
private Long sourceId; |
||||
|
||||
/** |
||||
* 来源内容 |
||||
*/ |
||||
private String sourceContent; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 操作人id |
||||
*/ |
||||
private Long opUserId; |
||||
|
||||
/** |
||||
* 操作人名称 |
||||
*/ |
||||
private String opUserName; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getCompanyAmountId() { |
||||
return companyAmountId; |
||||
} |
||||
|
||||
public void setCompanyAmountId(Long companyAmountId) { |
||||
this.companyAmountId = companyAmountId; |
||||
} |
||||
|
||||
public Long getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Long companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public String getCompanyName() { |
||||
return companyName; |
||||
} |
||||
|
||||
public void setCompanyName(String companyName) { |
||||
this.companyName = companyName; |
||||
} |
||||
|
||||
public Long getOrgId() { |
||||
return orgId; |
||||
} |
||||
|
||||
public void setOrgId(Long orgId) { |
||||
this.orgId = orgId; |
||||
} |
||||
|
||||
public String getOrgName() { |
||||
return orgName; |
||||
} |
||||
|
||||
public void setOrgName(String orgName) { |
||||
this.orgName = orgName; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public BigDecimal getAmount() { |
||||
return amount; |
||||
} |
||||
|
||||
public void setAmount(BigDecimal amount) { |
||||
this.amount = amount; |
||||
} |
||||
|
||||
public BigDecimal getBeforeAmount() { |
||||
return beforeAmount; |
||||
} |
||||
|
||||
public void setBeforeAmount(BigDecimal beforeAmount) { |
||||
this.beforeAmount = beforeAmount; |
||||
} |
||||
|
||||
public BigDecimal getAfterAmount() { |
||||
return afterAmount; |
||||
} |
||||
|
||||
public void setAfterAmount(BigDecimal afterAmount) { |
||||
this.afterAmount = afterAmount; |
||||
} |
||||
|
||||
public Integer getSourceType() { |
||||
return sourceType; |
||||
} |
||||
|
||||
public void setSourceType(Integer sourceType) { |
||||
this.sourceType = sourceType; |
||||
} |
||||
|
||||
public Long getSourceId() { |
||||
return sourceId; |
||||
} |
||||
|
||||
public void setSourceId(Long sourceId) { |
||||
this.sourceId = sourceId; |
||||
} |
||||
|
||||
public String getSourceContent() { |
||||
return sourceContent; |
||||
} |
||||
|
||||
public void setSourceContent(String sourceContent) { |
||||
this.sourceContent = sourceContent; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Long getOpUserId() { |
||||
return opUserId; |
||||
} |
||||
|
||||
public void setOpUserId(Long opUserId) { |
||||
this.opUserId = opUserId; |
||||
} |
||||
|
||||
public String getOpUserName() { |
||||
return opUserName; |
||||
} |
||||
|
||||
public void setOpUserName(String opUserName) { |
||||
this.opUserName = opUserName; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighCompanyAccountRecord other = (HighCompanyAccountRecord) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getCompanyAmountId() == null ? other.getCompanyAmountId() == null : this.getCompanyAmountId().equals(other.getCompanyAmountId())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) |
||||
&& (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId())) |
||||
&& (this.getOrgName() == null ? other.getOrgName() == null : this.getOrgName().equals(other.getOrgName())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) |
||||
&& (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount())) |
||||
&& (this.getAfterAmount() == null ? other.getAfterAmount() == null : this.getAfterAmount().equals(other.getAfterAmount())) |
||||
&& (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType())) |
||||
&& (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) |
||||
&& (this.getSourceContent() == null ? other.getSourceContent() == null : this.getSourceContent().equals(other.getSourceContent())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) |
||||
&& (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getCompanyAmountId() == null) ? 0 : getCompanyAmountId().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); |
||||
result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode()); |
||||
result = prime * result + ((getOrgName() == null) ? 0 : getOrgName().hashCode()); |
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); |
||||
result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode()); |
||||
result = prime * result + ((getAfterAmount() == null) ? 0 : getAfterAmount().hashCode()); |
||||
result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); |
||||
result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); |
||||
result = prime * result + ((getSourceContent() == null) ? 0 : getSourceContent().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); |
||||
result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", companyAmountId=").append(companyAmountId); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", companyName=").append(companyName); |
||||
sb.append(", orgId=").append(orgId); |
||||
sb.append(", orgName=").append(orgName); |
||||
sb.append(", type=").append(type); |
||||
sb.append(", amount=").append(amount); |
||||
sb.append(", beforeAmount=").append(beforeAmount); |
||||
sb.append(", afterAmount=").append(afterAmount); |
||||
sb.append(", sourceType=").append(sourceType); |
||||
sb.append(", sourceId=").append(sourceId); |
||||
sb.append(", sourceContent=").append(sourceContent); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", opUserId=").append(opUserId); |
||||
sb.append(", opUserName=").append(opUserName); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,197 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_company_two_pwd |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighCompanyTwoPwd implements Serializable { |
||||
private Long id; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Long companyId; |
||||
|
||||
/** |
||||
* 部门id |
||||
*/ |
||||
private Long orgId; |
||||
|
||||
/** |
||||
* 密码 |
||||
*/ |
||||
private String password; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 修改时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Long companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public Long getOrgId() { |
||||
return orgId; |
||||
} |
||||
|
||||
public void setOrgId(Long orgId) { |
||||
this.orgId = orgId; |
||||
} |
||||
|
||||
public String getPassword() { |
||||
return password; |
||||
} |
||||
|
||||
public void setPassword(String password) { |
||||
this.password = password; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighCompanyTwoPwd other = (HighCompanyTwoPwd) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId())) |
||||
&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode()); |
||||
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", orgId=").append(orgId); |
||||
sb.append(", password=").append(password); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,863 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class HighCompanyTwoPwdExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public HighCompanyTwoPwdExample() { |
||||
oredCriteria = new ArrayList<Criteria>(); |
||||
} |
||||
|
||||
public void setOrderByClause(String orderByClause) { |
||||
this.orderByClause = orderByClause; |
||||
} |
||||
|
||||
public String getOrderByClause() { |
||||
return orderByClause; |
||||
} |
||||
|
||||
public void setDistinct(boolean distinct) { |
||||
this.distinct = distinct; |
||||
} |
||||
|
||||
public boolean isDistinct() { |
||||
return distinct; |
||||
} |
||||
|
||||
public List<Criteria> getOredCriteria() { |
||||
return oredCriteria; |
||||
} |
||||
|
||||
public void or(Criteria criteria) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
|
||||
public Criteria or() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
oredCriteria.add(criteria); |
||||
return criteria; |
||||
} |
||||
|
||||
public Criteria createCriteria() { |
||||
Criteria criteria = createCriteriaInternal(); |
||||
if (oredCriteria.size() == 0) { |
||||
oredCriteria.add(criteria); |
||||
} |
||||
return criteria; |
||||
} |
||||
|
||||
protected Criteria createCriteriaInternal() { |
||||
Criteria criteria = new Criteria(); |
||||
return criteria; |
||||
} |
||||
|
||||
public void clear() { |
||||
oredCriteria.clear(); |
||||
orderByClause = null; |
||||
distinct = false; |
||||
} |
||||
|
||||
public void setLimit(Integer limit) { |
||||
this.limit = limit; |
||||
} |
||||
|
||||
public Integer getLimit() { |
||||
return limit; |
||||
} |
||||
|
||||
public void setOffset(Long offset) { |
||||
this.offset = offset; |
||||
} |
||||
|
||||
public Long getOffset() { |
||||
return offset; |
||||
} |
||||
|
||||
protected abstract static class GeneratedCriteria { |
||||
protected List<Criterion> criteria; |
||||
|
||||
protected GeneratedCriteria() { |
||||
super(); |
||||
criteria = new ArrayList<Criterion>(); |
||||
} |
||||
|
||||
public boolean isValid() { |
||||
return criteria.size() > 0; |
||||
} |
||||
|
||||
public List<Criterion> getAllCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
public List<Criterion> getCriteria() { |
||||
return criteria; |
||||
} |
||||
|
||||
protected void addCriterion(String condition) { |
||||
if (condition == null) { |
||||
throw new RuntimeException("Value for condition cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value, String property) { |
||||
if (value == null) { |
||||
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value)); |
||||
} |
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
if (value1 == null || value2 == null) { |
||||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
} |
||||
criteria.add(new Criterion(condition, value1, value2)); |
||||
} |
||||
|
||||
public Criteria andIdIsNull() { |
||||
addCriterion("id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIsNotNull() { |
||||
addCriterion("id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdEqualTo(Long value) { |
||||
addCriterion("id =", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotEqualTo(Long value) { |
||||
addCriterion("id <>", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThan(Long value) { |
||||
addCriterion("id >", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("id >=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThan(Long value) { |
||||
addCriterion("id <", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("id <=", value, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdIn(List<Long> values) { |
||||
addCriterion("id in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotIn(List<Long> values) { |
||||
addCriterion("id not in", values, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) { |
||||
addCriterion("id between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("id not between", value1, value2, "id"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdIsNull() { |
||||
addCriterion("company_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdIsNotNull() { |
||||
addCriterion("company_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdEqualTo(Long value) { |
||||
addCriterion("company_id =", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdNotEqualTo(Long value) { |
||||
addCriterion("company_id <>", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdGreaterThan(Long value) { |
||||
addCriterion("company_id >", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("company_id >=", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdLessThan(Long value) { |
||||
addCriterion("company_id <", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("company_id <=", value, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdIn(List<Long> values) { |
||||
addCriterion("company_id in", values, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdNotIn(List<Long> values) { |
||||
addCriterion("company_id not in", values, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdBetween(Long value1, Long value2) { |
||||
addCriterion("company_id between", value1, value2, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCompanyIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("company_id not between", value1, value2, "companyId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdIsNull() { |
||||
addCriterion("org_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdIsNotNull() { |
||||
addCriterion("org_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdEqualTo(Long value) { |
||||
addCriterion("org_id =", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdNotEqualTo(Long value) { |
||||
addCriterion("org_id <>", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdGreaterThan(Long value) { |
||||
addCriterion("org_id >", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdGreaterThanOrEqualTo(Long value) { |
||||
addCriterion("org_id >=", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdLessThan(Long value) { |
||||
addCriterion("org_id <", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdLessThanOrEqualTo(Long value) { |
||||
addCriterion("org_id <=", value, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdIn(List<Long> values) { |
||||
addCriterion("org_id in", values, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdNotIn(List<Long> values) { |
||||
addCriterion("org_id not in", values, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdBetween(Long value1, Long value2) { |
||||
addCriterion("org_id between", value1, value2, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andOrgIdNotBetween(Long value1, Long value2) { |
||||
addCriterion("org_id not between", value1, value2, "orgId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordIsNull() { |
||||
addCriterion("`password` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordIsNotNull() { |
||||
addCriterion("`password` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordEqualTo(String value) { |
||||
addCriterion("`password` =", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordNotEqualTo(String value) { |
||||
addCriterion("`password` <>", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordGreaterThan(String value) { |
||||
addCriterion("`password` >", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordGreaterThanOrEqualTo(String value) { |
||||
addCriterion("`password` >=", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordLessThan(String value) { |
||||
addCriterion("`password` <", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordLessThanOrEqualTo(String value) { |
||||
addCriterion("`password` <=", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordLike(String value) { |
||||
addCriterion("`password` like", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordNotLike(String value) { |
||||
addCriterion("`password` not like", value, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordIn(List<String> values) { |
||||
addCriterion("`password` in", values, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordNotIn(List<String> values) { |
||||
addCriterion("`password` not in", values, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordBetween(String value1, String value2) { |
||||
addCriterion("`password` between", value1, value2, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPasswordNotBetween(String value1, String value2) { |
||||
addCriterion("`password` not between", value1, value2, "password"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNull() { |
||||
addCriterion("`status` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNotNull() { |
||||
addCriterion("`status` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusEqualTo(Integer value) { |
||||
addCriterion("`status` =", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) { |
||||
addCriterion("`status` <>", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) { |
||||
addCriterion("`status` >", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` >=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThan(Integer value) { |
||||
addCriterion("`status` <", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` <=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIn(List<Integer> values) { |
||||
addCriterion("`status` in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) { |
||||
addCriterion("`status` not in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` not between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNull() { |
||||
addCriterion("create_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNotNull() { |
||||
addCriterion("create_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) { |
||||
addCriterion("create_time =", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) { |
||||
addCriterion("create_time <>", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) { |
||||
addCriterion("create_time >", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("create_time >=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) { |
||||
addCriterion("create_time <", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("create_time <=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) { |
||||
addCriterion("create_time in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) { |
||||
addCriterion("create_time not in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("create_time between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("create_time not between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNull() { |
||||
addCriterion("update_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNotNull() { |
||||
addCriterion("update_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) { |
||||
addCriterion("update_time =", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
||||
addCriterion("update_time <>", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) { |
||||
addCriterion("update_time >", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("update_time >=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) { |
||||
addCriterion("update_time <", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("update_time <=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) { |
||||
addCriterion("update_time in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
||||
addCriterion("update_time not in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("update_time between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("update_time not between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNull() { |
||||
addCriterion("ext_1 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1IsNotNull() { |
||||
addCriterion("ext_1 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1EqualTo(String value) { |
||||
addCriterion("ext_1 =", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotEqualTo(String value) { |
||||
addCriterion("ext_1 <>", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThan(String value) { |
||||
addCriterion("ext_1 >", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 >=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThan(String value) { |
||||
addCriterion("ext_1 <", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_1 <=", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Like(String value) { |
||||
addCriterion("ext_1 like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotLike(String value) { |
||||
addCriterion("ext_1 not like", value, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1In(List<String> values) { |
||||
addCriterion("ext_1 in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotIn(List<String> values) { |
||||
addCriterion("ext_1 not in", values, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1Between(String value1, String value2) { |
||||
addCriterion("ext_1 between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt1NotBetween(String value1, String value2) { |
||||
addCriterion("ext_1 not between", value1, value2, "ext1"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNull() { |
||||
addCriterion("ext_2 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2IsNotNull() { |
||||
addCriterion("ext_2 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2EqualTo(String value) { |
||||
addCriterion("ext_2 =", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotEqualTo(String value) { |
||||
addCriterion("ext_2 <>", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThan(String value) { |
||||
addCriterion("ext_2 >", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 >=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThan(String value) { |
||||
addCriterion("ext_2 <", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_2 <=", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Like(String value) { |
||||
addCriterion("ext_2 like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotLike(String value) { |
||||
addCriterion("ext_2 not like", value, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2In(List<String> values) { |
||||
addCriterion("ext_2 in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotIn(List<String> values) { |
||||
addCriterion("ext_2 not in", values, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2Between(String value1, String value2) { |
||||
addCriterion("ext_2 between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt2NotBetween(String value1, String value2) { |
||||
addCriterion("ext_2 not between", value1, value2, "ext2"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNull() { |
||||
addCriterion("ext_3 is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3IsNotNull() { |
||||
addCriterion("ext_3 is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3EqualTo(String value) { |
||||
addCriterion("ext_3 =", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotEqualTo(String value) { |
||||
addCriterion("ext_3 <>", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThan(String value) { |
||||
addCriterion("ext_3 >", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3GreaterThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 >=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThan(String value) { |
||||
addCriterion("ext_3 <", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3LessThanOrEqualTo(String value) { |
||||
addCriterion("ext_3 <=", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Like(String value) { |
||||
addCriterion("ext_3 like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotLike(String value) { |
||||
addCriterion("ext_3 not like", value, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3In(List<String> values) { |
||||
addCriterion("ext_3 in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotIn(List<String> values) { |
||||
addCriterion("ext_3 not in", values, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3Between(String value1, String value2) { |
||||
addCriterion("ext_3 between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andExt3NotBetween(String value1, String value2) { |
||||
addCriterion("ext_3 not between", value1, value2, "ext3"); |
||||
return (Criteria) this; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
*/ |
||||
public static class Criteria extends GeneratedCriteria { |
||||
|
||||
protected Criteria() { |
||||
super(); |
||||
} |
||||
} |
||||
|
||||
public static class Criterion { |
||||
private String condition; |
||||
|
||||
private Object value; |
||||
|
||||
private Object secondValue; |
||||
|
||||
private boolean noValue; |
||||
|
||||
private boolean singleValue; |
||||
|
||||
private boolean betweenValue; |
||||
|
||||
private boolean listValue; |
||||
|
||||
private String typeHandler; |
||||
|
||||
public String getCondition() { |
||||
return condition; |
||||
} |
||||
|
||||
public Object getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public Object getSecondValue() { |
||||
return secondValue; |
||||
} |
||||
|
||||
public boolean isNoValue() { |
||||
return noValue; |
||||
} |
||||
|
||||
public boolean isSingleValue() { |
||||
return singleValue; |
||||
} |
||||
|
||||
public boolean isBetweenValue() { |
||||
return betweenValue; |
||||
} |
||||
|
||||
public boolean isListValue() { |
||||
return listValue; |
||||
} |
||||
|
||||
public String getTypeHandler() { |
||||
return typeHandler; |
||||
} |
||||
|
||||
protected Criterion(String condition) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.typeHandler = null; |
||||
this.noValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.typeHandler = typeHandler; |
||||
if (value instanceof List<?>) { |
||||
this.listValue = true; |
||||
} else { |
||||
this.singleValue = true; |
||||
} |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value) { |
||||
this(condition, value, null); |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
super(); |
||||
this.condition = condition; |
||||
this.value = value; |
||||
this.secondValue = secondValue; |
||||
this.typeHandler = typeHandler; |
||||
this.betweenValue = true; |
||||
} |
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) { |
||||
this(condition, value, secondValue, null); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,246 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_oil_card |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighOilCard implements Serializable { |
||||
private Long id; |
||||
|
||||
/** |
||||
* 公司id |
||||
*/ |
||||
private Long companyId; |
||||
|
||||
/** |
||||
* 部门id |
||||
*/ |
||||
private Long orgId; |
||||
|
||||
/** |
||||
* 卡号 |
||||
*/ |
||||
private String cardNo; |
||||
|
||||
/** |
||||
* 余额 |
||||
*/ |
||||
private BigDecimal amount; |
||||
|
||||
/** |
||||
* 联系人姓名 |
||||
*/ |
||||
private String contactName; |
||||
|
||||
/** |
||||
* 联系人手机号 |
||||
*/ |
||||
private String contactPhone; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:正常 2:禁用 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 修改时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getCompanyId() { |
||||
return companyId; |
||||
} |
||||
|
||||
public void setCompanyId(Long companyId) { |
||||
this.companyId = companyId; |
||||
} |
||||
|
||||
public Long getOrgId() { |
||||
return orgId; |
||||
} |
||||
|
||||
public void setOrgId(Long orgId) { |
||||
this.orgId = orgId; |
||||
} |
||||
|
||||
public String getCardNo() { |
||||
return cardNo; |
||||
} |
||||
|
||||
public void setCardNo(String cardNo) { |
||||
this.cardNo = cardNo; |
||||
} |
||||
|
||||
public BigDecimal getAmount() { |
||||
return amount; |
||||
} |
||||
|
||||
public void setAmount(BigDecimal amount) { |
||||
this.amount = amount; |
||||
} |
||||
|
||||
public String getContactName() { |
||||
return contactName; |
||||
} |
||||
|
||||
public void setContactName(String contactName) { |
||||
this.contactName = contactName; |
||||
} |
||||
|
||||
public String getContactPhone() { |
||||
return contactPhone; |
||||
} |
||||
|
||||
public void setContactPhone(String contactPhone) { |
||||
this.contactPhone = contactPhone; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighOilCard other = (HighOilCard) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||
&& (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId())) |
||||
&& (this.getCardNo() == null ? other.getCardNo() == null : this.getCardNo().equals(other.getCardNo())) |
||||
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) |
||||
&& (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName())) |
||||
&& (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||
result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode()); |
||||
result = prime * result + ((getCardNo() == null) ? 0 : getCardNo().hashCode()); |
||||
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); |
||||
result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode()); |
||||
result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", companyId=").append(companyId); |
||||
sb.append(", orgId=").append(orgId); |
||||
sb.append(", cardNo=").append(cardNo); |
||||
sb.append(", amount=").append(amount); |
||||
sb.append(", contactName=").append(contactName); |
||||
sb.append(", contactPhone=").append(contactPhone); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,294 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_oil_card_record |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighOilCardRecord implements Serializable { |
||||
private Long id; |
||||
|
||||
/** |
||||
* 油卡id |
||||
*/ |
||||
private Long oilCardId; |
||||
|
||||
/** |
||||
* 类型 1:进账 2:出账 3:变更手机号 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 金额 |
||||
*/ |
||||
private BigDecimal amount; |
||||
|
||||
/** |
||||
* 变更前金额 |
||||
*/ |
||||
private BigDecimal beforeAmount; |
||||
|
||||
/** |
||||
* 变更后金额 |
||||
*/ |
||||
private BigDecimal afterAmount; |
||||
|
||||
/** |
||||
* 来源类型 1. 金额充值 2.绑定手机号 3. 变更手机号 4. 消费订单 |
||||
*/ |
||||
private Integer sourceType; |
||||
|
||||
/** |
||||
* 来源id |
||||
*/ |
||||
private Long sourceId; |
||||
|
||||
/** |
||||
* 来源内容 |
||||
*/ |
||||
private String sourceContent; |
||||
|
||||
/** |
||||
* 状态 0:删除 1:正常 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 操作人id |
||||
*/ |
||||
private Long opUserId; |
||||
|
||||
/** |
||||
* 操作人名称 |
||||
*/ |
||||
private String opUserName; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getOilCardId() { |
||||
return oilCardId; |
||||
} |
||||
|
||||
public void setOilCardId(Long oilCardId) { |
||||
this.oilCardId = oilCardId; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public BigDecimal getAmount() { |
||||
return amount; |
||||
} |
||||
|
||||
public void setAmount(BigDecimal amount) { |
||||
this.amount = amount; |
||||
} |
||||
|
||||
public BigDecimal getBeforeAmount() { |
||||
return beforeAmount; |
||||
} |
||||
|
||||
public void setBeforeAmount(BigDecimal beforeAmount) { |
||||
this.beforeAmount = beforeAmount; |
||||
} |
||||
|
||||
public BigDecimal getAfterAmount() { |
||||
return afterAmount; |
||||
} |
||||
|
||||
public void setAfterAmount(BigDecimal afterAmount) { |
||||
this.afterAmount = afterAmount; |
||||
} |
||||
|
||||
public Integer getSourceType() { |
||||
return sourceType; |
||||
} |
||||
|
||||
public void setSourceType(Integer sourceType) { |
||||
this.sourceType = sourceType; |
||||
} |
||||
|
||||
public Long getSourceId() { |
||||
return sourceId; |
||||
} |
||||
|
||||
public void setSourceId(Long sourceId) { |
||||
this.sourceId = sourceId; |
||||
} |
||||
|
||||
public String getSourceContent() { |
||||
return sourceContent; |
||||
} |
||||
|
||||
public void setSourceContent(String sourceContent) { |
||||
this.sourceContent = sourceContent; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Long getOpUserId() { |
||||
return opUserId; |
||||
} |
||||
|
||||
public void setOpUserId(Long opUserId) { |
||||
this.opUserId = opUserId; |
||||
} |
||||
|
||||
public String getOpUserName() { |
||||
return opUserName; |
||||
} |
||||
|
||||
public void setOpUserName(String opUserName) { |
||||
this.opUserName = opUserName; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
HighOilCardRecord other = (HighOilCardRecord) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getOilCardId() == null ? other.getOilCardId() == null : this.getOilCardId().equals(other.getOilCardId())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) |
||||
&& (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount())) |
||||
&& (this.getAfterAmount() == null ? other.getAfterAmount() == null : this.getAfterAmount().equals(other.getAfterAmount())) |
||||
&& (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType())) |
||||
&& (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) |
||||
&& (this.getSourceContent() == null ? other.getSourceContent() == null : this.getSourceContent().equals(other.getSourceContent())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) |
||||
&& (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getOilCardId() == null) ? 0 : getOilCardId().hashCode()); |
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); |
||||
result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode()); |
||||
result = prime * result + ((getAfterAmount() == null) ? 0 : getAfterAmount().hashCode()); |
||||
result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); |
||||
result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); |
||||
result = prime * result + ((getSourceContent() == null) ? 0 : getSourceContent().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); |
||||
result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", oilCardId=").append(oilCardId); |
||||
sb.append(", type=").append(type); |
||||
sb.append(", amount=").append(amount); |
||||
sb.append(", beforeAmount=").append(beforeAmount); |
||||
sb.append(", afterAmount=").append(afterAmount); |
||||
sb.append(", sourceType=").append(sourceType); |
||||
sb.append(", sourceId=").append(sourceId); |
||||
sb.append(", sourceContent=").append(sourceContent); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", opUserId=").append(opUserId); |
||||
sb.append(", opUserName=").append(opUserName); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
/** |
||||
* 公司 |
||||
* @author hurui |
||||
*/ |
||||
public enum CompanyAmountSourceTypeEnum { |
||||
type1(1, "金额充值"), |
||||
type2(2, "油卡充值") |
||||
; |
||||
|
||||
private Integer type; |
||||
|
||||
private String name; |
||||
|
||||
CompanyAmountSourceTypeEnum(int type, String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,36 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
/** |
||||
* 公司 |
||||
* @author hurui |
||||
*/ |
||||
public enum CompanyAmountTypeEnum { |
||||
type1(1, "进账"), |
||||
type2(2, "出账") |
||||
; |
||||
|
||||
private Integer type; |
||||
|
||||
private String name; |
||||
|
||||
CompanyAmountTypeEnum(int type, String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,25 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.entity.HighCompanyAccountRecord; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 公司账户记录 |
||||
* @author hurui |
||||
*/ |
||||
public interface HighCompanyAccountRecordService { |
||||
|
||||
/** |
||||
* 增加记录 |
||||
* @param companyAmountRecord |
||||
*/ |
||||
void insertRecord(HighCompanyAccountRecord companyAmountRecord); |
||||
|
||||
/** |
||||
* 查询记录列表 |
||||
* @param param |
||||
* @return |
||||
*/ |
||||
List<HighCompanyAccountRecord> getRecordList(Map<String, Object> param); |
||||
} |
@ -0,0 +1,41 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.entity.HighCompanyAccount; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 公司账户 |
||||
* @author hurui |
||||
*/ |
||||
public interface HighCompanyAccountService { |
||||
|
||||
/** |
||||
* 编辑数据 |
||||
* @param companyAccount |
||||
*/ |
||||
void editData(HighCompanyAccount companyAccount); |
||||
|
||||
/** |
||||
* 进账 |
||||
* @param orgId 单位id |
||||
* @param amount 金额 |
||||
*/ |
||||
void recharge(Long orgId, BigDecimal amount); |
||||
|
||||
/** |
||||
* 出账 |
||||
* @param orgId 单位id |
||||
* @param amount 金额 |
||||
* @param otherParam 其他参数 |
||||
*/ |
||||
void consume(Long orgId, BigDecimal amount, Map<String, Object> otherParam); |
||||
|
||||
/** |
||||
* 根据单位id 查询 |
||||
* @param orgId |
||||
* @return |
||||
*/ |
||||
HighCompanyAccount getAccountByOrgId(Long orgId); |
||||
} |
@ -0,0 +1,63 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.hai.dao.HighCompanyAccountRecordMapper; |
||||
import com.hai.entity.HighCompanyAccountRecord; |
||||
import com.hai.entity.HighCompanyAccountRecordExample; |
||||
import com.hai.service.HighCompanyAccountRecordService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("companyAccountRecordService") |
||||
public class HighCompanyAccountRecordServiceImpl implements HighCompanyAccountRecordService { |
||||
@Resource |
||||
private HighCompanyAccountRecordMapper companyAccountRecordMapper; |
||||
|
||||
@Override |
||||
public void insertRecord(HighCompanyAccountRecord companyAmountRecord) { |
||||
companyAmountRecord.setStatus(1); |
||||
companyAmountRecord.setCreateTime(new Date()); |
||||
companyAccountRecordMapper.insert(companyAmountRecord); |
||||
} |
||||
|
||||
@Override |
||||
public List<HighCompanyAccountRecord> getRecordList(Map<String, Object> param) { |
||||
HighCompanyAccountRecordExample example = new HighCompanyAccountRecordExample(); |
||||
HighCompanyAccountRecordExample.Criteria criteria = example.createCriteria().andStatusEqualTo(1); |
||||
|
||||
if (MapUtils.getLong(param, "companyAmountId") != null) { |
||||
criteria.andCompanyAmountIdEqualTo(MapUtils.getLong(param, "companyAmountId")); |
||||
} |
||||
|
||||
if (MapUtils.getLong(param, "companyId") != null) { |
||||
criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId")); |
||||
} |
||||
|
||||
if (MapUtils.getLong(param, "orgId") != null) { |
||||
criteria.andOrgIdEqualTo(MapUtils.getLong(param, "orgId")); |
||||
} |
||||
|
||||
if (MapUtils.getInteger(param, "type") != null) { |
||||
criteria.andTypeEqualTo(MapUtils.getInteger(param, "type")); |
||||
} |
||||
|
||||
if (MapUtils.getInteger(param, "sourceType") != null) { |
||||
criteria.andSourceTypeEqualTo(MapUtils.getInteger(param, "sourceType")); |
||||
} |
||||
|
||||
if (MapUtils.getLong(param, "createTimeS") != null) { |
||||
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS"))); |
||||
} |
||||
|
||||
if (MapUtils.getLong(param, "createTimeE") != null) { |
||||
criteria.andCreateTimeLessThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeE"))); |
||||
} |
||||
|
||||
example.setOrderByClause("create_time desc"); |
||||
return companyAccountRecordMapper.selectByExample(example); |
||||
} |
||||
} |
@ -0,0 +1,183 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.security.UserCenter; |
||||
import com.hai.common.utils.RedisUtil; |
||||
import com.hai.dao.HighCompanyAccountMapper; |
||||
import com.hai.entity.*; |
||||
import com.hai.enum_type.CompanyAmountSourceTypeEnum; |
||||
import com.hai.enum_type.CompanyAmountTypeEnum; |
||||
import com.hai.model.UserInfoModel; |
||||
import com.hai.service.BsCompanyService; |
||||
import com.hai.service.BsOrganizationService; |
||||
import com.hai.service.HighCompanyAccountRecordService; |
||||
import com.hai.service.HighCompanyAccountService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Isolation; |
||||
import org.springframework.transaction.annotation.Propagation; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("companyAccountService") |
||||
public class HighCompanyAccountServiceImpl implements HighCompanyAccountService { |
||||
|
||||
@Resource |
||||
private BsCompanyService companyService; |
||||
|
||||
@Resource |
||||
private HighCompanyAccountMapper companyAccountMapper; |
||||
|
||||
@Resource |
||||
private HighCompanyAccountRecordService companyAccountRecordService; |
||||
|
||||
@Resource |
||||
private BsOrganizationService organizationService; |
||||
|
||||
@Resource |
||||
private RedisUtil redisUtil; |
||||
|
||||
@Resource |
||||
private UserCenter userCenter; |
||||
|
||||
@Override |
||||
public void editData(HighCompanyAccount companyAccount) { |
||||
if (companyAccount.getId() == null) { |
||||
companyAccount.setCreateTime(new Date()); |
||||
companyAccount.setUpdateTime(new Date()); |
||||
companyAccount.setStatus(1); |
||||
companyAccountMapper.insert(companyAccount); |
||||
} else { |
||||
companyAccount.setUpdateTime(new Date()); |
||||
companyAccountMapper.updateByPrimaryKey(companyAccount); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
@Transactional(rollbackFor=Exception.class,isolation = Isolation.SERIALIZABLE,propagation= Propagation.REQUIRES_NEW) |
||||
public void recharge(Long orgId, BigDecimal amount) { |
||||
// 查询单位
|
||||
BsOrganization organization = organizationService.findById(orgId); |
||||
if (organization == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的单位"); |
||||
} |
||||
// 操作人
|
||||
UserInfoModel sessionModel = userCenter.getSessionModel(UserInfoModel.class); |
||||
if (sessionModel == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知用户"); |
||||
} |
||||
if (sessionModel.getBsCompany() == null || !(sessionModel.getBsCompany().getId().equals(organization.getCompanyId()))) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); |
||||
} |
||||
|
||||
// 查询公司信息
|
||||
BsCompany company = companyService.getCompanyById(organization.getCompanyId()); |
||||
if (company == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知公司信息"); |
||||
} |
||||
|
||||
// 是否开通了账户
|
||||
HighCompanyAccount companyAccount = getAccountByOrgId(organization.getId()); |
||||
if (companyAccount == null) { |
||||
companyAccount = new HighCompanyAccount(); |
||||
companyAccount.setCompanyId(organization.getCompanyId()); |
||||
companyAccount.setOrgId(organization.getId()); |
||||
companyAccount.setAmounts(new BigDecimal("0")); |
||||
} |
||||
// 变更前金额
|
||||
BigDecimal beforeAmount = companyAccount.getAmounts(); |
||||
// 计算金额
|
||||
companyAccount.setAmounts(companyAccount.getAmounts().add(amount)); |
||||
// 变更后金额
|
||||
BigDecimal afterAmount = companyAccount.getAmounts(); |
||||
editData(companyAccount); |
||||
|
||||
HighCompanyAccountRecord record = new HighCompanyAccountRecord(); |
||||
record.setAfterAmount(companyAccount.getAmounts()); |
||||
record.setCompanyAmountId(companyAccount.getId()); |
||||
record.setCompanyName(company.getName()); |
||||
record.setCompanyId(organization.getCompanyId()); |
||||
record.setOrgId(organization.getId()); |
||||
record.setOrgName(organization.getName()); |
||||
record.setAmount(amount); |
||||
record.setBeforeAmount(beforeAmount); |
||||
record.setAfterAmount(afterAmount); |
||||
record.setType(CompanyAmountTypeEnum.type1.getType()); |
||||
record.setSourceType(CompanyAmountSourceTypeEnum.type1.getType()); |
||||
record.setSourceContent("充值金额:" + amount + " 元"); |
||||
record.setOpUserId(sessionModel.getSecUser().getId()); |
||||
record.setOpUserName(sessionModel.getSecUser().getUserName()); |
||||
companyAccountRecordService.insertRecord(record); |
||||
|
||||
redisUtil.del("COMPANY_AMOUNT_RECHARGE_SMS_CODE"); |
||||
} |
||||
|
||||
@Override |
||||
@Transactional(rollbackFor=Exception.class,isolation = Isolation.SERIALIZABLE,propagation= Propagation.REQUIRES_NEW) |
||||
public void consume(Long orgId, BigDecimal amount, Map<String, Object> otherParam) { |
||||
// 查询单位
|
||||
BsOrganization organization = organizationService.findById(orgId); |
||||
if (organization == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的单位"); |
||||
} |
||||
// 操作人
|
||||
UserInfoModel sessionModel = userCenter.getSessionModel(UserInfoModel.class); |
||||
if (sessionModel == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知用户"); |
||||
} |
||||
if (sessionModel.getBsCompany() == null || !(sessionModel.getBsCompany().getId().equals(organization.getCompanyId()))) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); |
||||
} |
||||
// 是否开通了账户
|
||||
HighCompanyAccount companyAccount = getAccountByOrgId(organization.getId()); |
||||
if (companyAccount == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); |
||||
} |
||||
// 公司余额 是否小于 出账余额
|
||||
if (companyAccount.getAmounts().compareTo(amount) == -1) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); |
||||
} |
||||
|
||||
// 变更前金额
|
||||
BigDecimal beforeAmount = companyAccount.getAmounts(); |
||||
// 计算金额
|
||||
companyAccount.setAmounts(companyAccount.getAmounts().subtract(amount)); |
||||
// 变更后金额
|
||||
BigDecimal afterAmount = companyAccount.getAmounts(); |
||||
editData(companyAccount); |
||||
|
||||
HighCompanyAccountRecord record = new HighCompanyAccountRecord(); |
||||
record.setAfterAmount(companyAccount.getAmounts()); |
||||
record.setCompanyAmountId(companyAccount.getId()); |
||||
record.setCompanyId(organization.getCompanyId()); |
||||
record.setOrgId(organization.getId()); |
||||
record.setAmount(amount); |
||||
record.setBeforeAmount(beforeAmount); |
||||
record.setAfterAmount(afterAmount); |
||||
record.setType(CompanyAmountTypeEnum.type2.getType()); |
||||
record.setSourceType(MapUtils.getInteger(otherParam, "sourceType")); |
||||
record.setSourceId(MapUtils.getLong(otherParam, "sourceId")); |
||||
record.setSourceContent(MapUtils.getString(otherParam, "sourceContent")); |
||||
record.setOpUserId(sessionModel.getSecUser().getId()); |
||||
record.setOpUserName(sessionModel.getSecUser().getUserName()); |
||||
companyAccountRecordService.insertRecord(record); |
||||
} |
||||
|
||||
@Override |
||||
public HighCompanyAccount getAccountByOrgId(Long orgId) { |
||||
HighCompanyAccountExample example = new HighCompanyAccountExample(); |
||||
example.createCriteria().andStatusEqualTo(1).andOrgIdEqualTo(orgId); |
||||
List<HighCompanyAccount> list = companyAccountMapper.selectByExample(example); |
||||
if (list.size() > 0) { |
||||
return list.get(0); |
||||
} |
||||
return null; |
||||
} |
||||
} |
Loading…
Reference in new issue