parent
4a81bfeab2
commit
da705b10bd
@ -0,0 +1,136 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.pay.util.XmlUtil; |
||||
import com.hai.common.pay.util.sdk.WXPayConstants; |
||||
import com.hai.common.utils.HttpsUtils; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.common.utils.WxUtils; |
||||
import com.hai.entity.HighGasChannelConfig; |
||||
import com.hai.entity.HighMerchantTripartitePlatform; |
||||
import com.hai.enum_type.GasChannel; |
||||
import com.hai.enum_type.GasChannelPayPlatformType; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.model.WxSharingReceiversVO; |
||||
import com.hai.service.HighGasChannelConfigService; |
||||
import com.hai.service.HighMerchantTripartitePlatformService; |
||||
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.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
import java.util.SortedMap; |
||||
|
||||
@Controller |
||||
@RequestMapping(value = "/gasChannelConfig") |
||||
@Api(value = "加油站渠道商配置") |
||||
public class HighGasChannelConfigController { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(HighGasChannelConfigController.class); |
||||
|
||||
@Resource |
||||
private HighGasChannelConfigService gasChannelConfigService; |
||||
|
||||
@RequestMapping(value="/editTripartitePlatform",method = RequestMethod.POST) |
||||
@ResponseBody |
||||
@ApiOperation(value = "编辑第三方平台") |
||||
public ResponseData editTripartitePlatform(@RequestBody JSONObject body) { |
||||
try { |
||||
if (body == null |
||||
|| body.getInteger("channelId") == null |
||||
|| body.getInteger("payPlatformType") == null |
||||
|| StringUtils.isBlank(body.getString("payPlatformMerName")) |
||||
|| StringUtils.isBlank(body.getString("payPlatformMerNo")) |
||||
|| body.getBoolean("profitSharingStatus") == null |
||||
) { |
||||
log.error("HighGasChannelConfigController -> editTripartitePlatform() error!",""); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
||||
} |
||||
|
||||
if (body.getBoolean("profitSharingStatus") == true && |
||||
(body.getBigDecimal("profitSharingRatio") == null || |
||||
StringUtils.isBlank(body.getString("profitSharingReceiversNo")) || |
||||
StringUtils.isBlank(body.getString("profitSharingReceiversName")))) { |
||||
log.error("HighGasChannelConfigController -> editTripartitePlatform() error!",""); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
||||
} |
||||
|
||||
// 查询平台
|
||||
HighGasChannelConfig platform = gasChannelConfigService.getConfig( |
||||
GasChannel.getChannelByType(body.getInteger("channelId")), |
||||
GasChannelPayPlatformType.getPlatformByType(body.getInteger("payPlatformType"))); |
||||
|
||||
if (platform == null) { |
||||
platform = new HighGasChannelConfig(); |
||||
} |
||||
platform.setChannelId(body.getInteger("channelId")); |
||||
platform.setChannelName(GasChannel.getChannelByType(body.getInteger("channelId")).getName()); |
||||
platform.setPayPlatformType(body.getInteger("payPlatformType")); |
||||
platform.setPayPlatformMerName(body.getString("payPlatformMerName")); |
||||
platform.setPayPlatformMerNo(body.getString("payPlatformMerNo")); |
||||
platform.setProfitSharingStatus(body.getBoolean("profitSharingStatus")); |
||||
platform.setProfitSharingRatio(body.getBigDecimal("profitSharingRatio")); |
||||
platform.setProfitSharingReceiversNo(body.getString("profitSharingReceiversNo")); |
||||
platform.setProfitSharingReceiversName(body.getString("profitSharingReceiversName")); |
||||
|
||||
// 微信平台 增加分账关系
|
||||
if (platform.getPayPlatformType().equals(1) && platform.getProfitSharingStatus().equals(true)) { |
||||
WxSharingReceiversVO receiversVO = new WxSharingReceiversVO(); |
||||
receiversVO.setAccount(platform.getProfitSharingReceiversNo()); |
||||
receiversVO.setType("MERCHANT_ID"); |
||||
receiversVO.setName(platform.getProfitSharingReceiversName()); |
||||
receiversVO.setRelation_type("SERVICE_PROVIDER"); |
||||
|
||||
Map<String , String> map = new HashMap<>(); |
||||
map.put("mch_id" , "1289663601"); // 服务商
|
||||
map.put("sub_mch_id" , platform.getPayPlatformMerNo()); |
||||
map.put("appid" , "wxa075e8509802f826"); |
||||
map.put("nonce_str" , WxUtils.makeNonStr()); |
||||
map.put("sign_type" , "HMAC-SHA256"); |
||||
map.put("receiver" , JSONObject.toJSONString(receiversVO)); |
||||
String sign = WxUtils.generateSignature(map, "Skufk5oi85wDFGl888i6wsRSTkdd5df5" , WXPayConstants.SignType.HMACSHA256); |
||||
map.put("sign" , sign); |
||||
String notifyXml = HttpsUtils.postData("https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver", WxUtils.mapToXml(map)); |
||||
SortedMap<String, String> postData = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8"); |
||||
if (!postData.get("result_code").equals("SUCCESS")) { |
||||
log.error("HighMerchantController -> editTripartitePlatform() error!", postData.get("err_code_des")); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, postData.get("err_code_des")); |
||||
} |
||||
} |
||||
|
||||
gasChannelConfigService.editConfig(platform); |
||||
|
||||
return ResponseMsgUtil.success("操作成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighGasChannelConfigController -> editTripartitePlatform() error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value="/getDetail",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询详情") |
||||
public ResponseData getDetail(@RequestParam(value = "channelId" , required = true) Integer channelId, |
||||
@RequestParam(value = "payPlatformType" , required = true) Integer payPlatformType, |
||||
HttpServletRequest request) { |
||||
try { |
||||
|
||||
return ResponseMsgUtil.success(gasChannelConfigService.getConfig(GasChannel.getChannelByType(channelId), GasChannelPayPlatformType.getPlatformByType(payPlatformType))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighGasChannelConfigController -> getDetail() error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,160 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsTripartiteReqLog; |
||||
import com.hai.entity.BsTripartiteReqLogExample; |
||||
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 BsTripartiteReqLogMapper extends BsTripartiteReqLogMapperExt { |
||||
@SelectProvider(type=BsTripartiteReqLogSqlProvider.class, method="countByExample") |
||||
long countByExample(BsTripartiteReqLogExample example); |
||||
|
||||
@DeleteProvider(type=BsTripartiteReqLogSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsTripartiteReqLogExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_tripartite_req_log", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into bs_tripartite_req_log (log_type, log_type_name, ", |
||||
"log_serial_no, request_type, ", |
||||
"request_url, request_content, ", |
||||
"create_time, ext_1, ", |
||||
"ext_2, ext_3, response_content)", |
||||
"values (#{logType,jdbcType=INTEGER}, #{logTypeName,jdbcType=VARCHAR}, ", |
||||
"#{logSerialNo,jdbcType=VARCHAR}, #{requestType,jdbcType=INTEGER}, ", |
||||
"#{requestUrl,jdbcType=VARCHAR}, #{requestContent,jdbcType=VARCHAR}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", |
||||
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{responseContent,jdbcType=LONGVARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(BsTripartiteReqLog record); |
||||
|
||||
@InsertProvider(type=BsTripartiteReqLogSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(BsTripartiteReqLog record); |
||||
|
||||
@SelectProvider(type=BsTripartiteReqLogSqlProvider.class, method="selectByExampleWithBLOBs") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="log_type", property="logType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="log_type_name", property="logTypeName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="log_serial_no", property="logSerialNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="request_type", property="requestType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="request_url", property="requestUrl", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="request_content", property="requestContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="create_time", property="createTime", 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), |
||||
@Result(column="response_content", property="responseContent", jdbcType=JdbcType.LONGVARCHAR) |
||||
}) |
||||
List<BsTripartiteReqLog> selectByExampleWithBLOBs(BsTripartiteReqLogExample example); |
||||
|
||||
@SelectProvider(type=BsTripartiteReqLogSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="log_type", property="logType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="log_type_name", property="logTypeName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="log_serial_no", property="logSerialNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="request_type", property="requestType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="request_url", property="requestUrl", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="request_content", property="requestContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="create_time", property="createTime", 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<BsTripartiteReqLog> selectByExample(BsTripartiteReqLogExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, log_type, log_type_name, log_serial_no, request_type, request_url, request_content, ", |
||||
"create_time, ext_1, ext_2, ext_3, response_content", |
||||
"from bs_tripartite_req_log", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="log_type", property="logType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="log_type_name", property="logTypeName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="log_serial_no", property="logSerialNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="request_type", property="requestType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="request_url", property="requestUrl", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="request_content", property="requestContent", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="create_time", property="createTime", 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), |
||||
@Result(column="response_content", property="responseContent", jdbcType=JdbcType.LONGVARCHAR) |
||||
}) |
||||
BsTripartiteReqLog selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=BsTripartiteReqLogSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsTripartiteReqLog record, @Param("example") BsTripartiteReqLogExample example); |
||||
|
||||
@UpdateProvider(type=BsTripartiteReqLogSqlProvider.class, method="updateByExampleWithBLOBs") |
||||
int updateByExampleWithBLOBs(@Param("record") BsTripartiteReqLog record, @Param("example") BsTripartiteReqLogExample example); |
||||
|
||||
@UpdateProvider(type=BsTripartiteReqLogSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsTripartiteReqLog record, @Param("example") BsTripartiteReqLogExample example); |
||||
|
||||
@UpdateProvider(type=BsTripartiteReqLogSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsTripartiteReqLog record); |
||||
|
||||
@Update({ |
||||
"update bs_tripartite_req_log", |
||||
"set log_type = #{logType,jdbcType=INTEGER},", |
||||
"log_type_name = #{logTypeName,jdbcType=VARCHAR},", |
||||
"log_serial_no = #{logSerialNo,jdbcType=VARCHAR},", |
||||
"request_type = #{requestType,jdbcType=INTEGER},", |
||||
"request_url = #{requestUrl,jdbcType=VARCHAR},", |
||||
"request_content = #{requestContent,jdbcType=VARCHAR},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR},", |
||||
"response_content = #{responseContent,jdbcType=LONGVARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKeyWithBLOBs(BsTripartiteReqLog record); |
||||
|
||||
@Update({ |
||||
"update bs_tripartite_req_log", |
||||
"set log_type = #{logType,jdbcType=INTEGER},", |
||||
"log_type_name = #{logTypeName,jdbcType=VARCHAR},", |
||||
"log_serial_no = #{logSerialNo,jdbcType=VARCHAR},", |
||||
"request_type = #{requestType,jdbcType=INTEGER},", |
||||
"request_url = #{requestUrl,jdbcType=VARCHAR},", |
||||
"request_content = #{requestContent,jdbcType=VARCHAR},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(BsTripartiteReqLog record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsTripartiteReqLogMapperExt { |
||||
} |
@ -0,0 +1,380 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.BsTripartiteReqLog; |
||||
import com.hai.entity.BsTripartiteReqLogExample.Criteria; |
||||
import com.hai.entity.BsTripartiteReqLogExample.Criterion; |
||||
import com.hai.entity.BsTripartiteReqLogExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsTripartiteReqLogSqlProvider { |
||||
|
||||
public String countByExample(BsTripartiteReqLogExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_tripartite_req_log"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsTripartiteReqLogExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_tripartite_req_log"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsTripartiteReqLog record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_tripartite_req_log"); |
||||
|
||||
if (record.getLogType() != null) { |
||||
sql.VALUES("log_type", "#{logType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getLogTypeName() != null) { |
||||
sql.VALUES("log_type_name", "#{logTypeName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogSerialNo() != null) { |
||||
sql.VALUES("log_serial_no", "#{logSerialNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRequestType() != null) { |
||||
sql.VALUES("request_type", "#{requestType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRequestUrl() != null) { |
||||
sql.VALUES("request_url", "#{requestUrl,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRequestContent() != null) { |
||||
sql.VALUES("request_content", "#{requestContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,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}"); |
||||
} |
||||
|
||||
if (record.getResponseContent() != null) { |
||||
sql.VALUES("response_content", "#{responseContent,jdbcType=LONGVARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExampleWithBLOBs(BsTripartiteReqLogExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("log_type"); |
||||
sql.SELECT("log_type_name"); |
||||
sql.SELECT("log_serial_no"); |
||||
sql.SELECT("request_type"); |
||||
sql.SELECT("request_url"); |
||||
sql.SELECT("request_content"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.SELECT("response_content"); |
||||
sql.FROM("bs_tripartite_req_log"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(BsTripartiteReqLogExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("log_type"); |
||||
sql.SELECT("log_type_name"); |
||||
sql.SELECT("log_serial_no"); |
||||
sql.SELECT("request_type"); |
||||
sql.SELECT("request_url"); |
||||
sql.SELECT("request_content"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("bs_tripartite_req_log"); |
||||
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) { |
||||
BsTripartiteReqLog record = (BsTripartiteReqLog) parameter.get("record"); |
||||
BsTripartiteReqLogExample example = (BsTripartiteReqLogExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_tripartite_req_log"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getLogType() != null) { |
||||
sql.SET("log_type = #{record.logType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getLogTypeName() != null) { |
||||
sql.SET("log_type_name = #{record.logTypeName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogSerialNo() != null) { |
||||
sql.SET("log_serial_no = #{record.logSerialNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRequestType() != null) { |
||||
sql.SET("request_type = #{record.requestType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRequestUrl() != null) { |
||||
sql.SET("request_url = #{record.requestUrl,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRequestContent() != null) { |
||||
sql.SET("request_content = #{record.requestContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,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}"); |
||||
} |
||||
|
||||
if (record.getResponseContent() != null) { |
||||
sql.SET("response_content = #{record.responseContent,jdbcType=LONGVARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleWithBLOBs(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_tripartite_req_log"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("log_type = #{record.logType,jdbcType=INTEGER}"); |
||||
sql.SET("log_type_name = #{record.logTypeName,jdbcType=VARCHAR}"); |
||||
sql.SET("log_serial_no = #{record.logSerialNo,jdbcType=VARCHAR}"); |
||||
sql.SET("request_type = #{record.requestType,jdbcType=INTEGER}"); |
||||
sql.SET("request_url = #{record.requestUrl,jdbcType=VARCHAR}"); |
||||
sql.SET("request_content = #{record.requestContent,jdbcType=VARCHAR}"); |
||||
sql.SET("create_time = #{record.createTime,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}"); |
||||
sql.SET("response_content = #{record.responseContent,jdbcType=LONGVARCHAR}"); |
||||
|
||||
BsTripartiteReqLogExample example = (BsTripartiteReqLogExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_tripartite_req_log"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("log_type = #{record.logType,jdbcType=INTEGER}"); |
||||
sql.SET("log_type_name = #{record.logTypeName,jdbcType=VARCHAR}"); |
||||
sql.SET("log_serial_no = #{record.logSerialNo,jdbcType=VARCHAR}"); |
||||
sql.SET("request_type = #{record.requestType,jdbcType=INTEGER}"); |
||||
sql.SET("request_url = #{record.requestUrl,jdbcType=VARCHAR}"); |
||||
sql.SET("request_content = #{record.requestContent,jdbcType=VARCHAR}"); |
||||
sql.SET("create_time = #{record.createTime,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}"); |
||||
|
||||
BsTripartiteReqLogExample example = (BsTripartiteReqLogExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsTripartiteReqLog record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_tripartite_req_log"); |
||||
|
||||
if (record.getLogType() != null) { |
||||
sql.SET("log_type = #{logType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getLogTypeName() != null) { |
||||
sql.SET("log_type_name = #{logTypeName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLogSerialNo() != null) { |
||||
sql.SET("log_serial_no = #{logSerialNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRequestType() != null) { |
||||
sql.SET("request_type = #{requestType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRequestUrl() != null) { |
||||
sql.SET("request_url = #{requestUrl,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getRequestContent() != null) { |
||||
sql.SET("request_content = #{requestContent,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,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}"); |
||||
} |
||||
|
||||
if (record.getResponseContent() != null) { |
||||
sql.SET("response_content = #{responseContent,jdbcType=LONGVARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, BsTripartiteReqLogExample 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,142 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighGasChannelConfig; |
||||
import com.hai.entity.HighGasChannelConfigExample; |
||||
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 HighGasChannelConfigMapper extends HighGasChannelConfigMapperExt { |
||||
@SelectProvider(type=HighGasChannelConfigSqlProvider.class, method="countByExample") |
||||
long countByExample(HighGasChannelConfigExample example); |
||||
|
||||
@DeleteProvider(type=HighGasChannelConfigSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(HighGasChannelConfigExample example); |
||||
|
||||
@Delete({ |
||||
"delete from high_gas_channel_config", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into high_gas_channel_config (channel_id, channel_name, ", |
||||
"pay_platform_type, pay_platform_mer_name, ", |
||||
"pay_platform_mer_no, profit_sharing_status, ", |
||||
"profit_sharing_receivers_no, profit_sharing_ratio, ", |
||||
"profit_sharing_receivers_name, `status`, ", |
||||
"create_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{channelId,jdbcType=INTEGER}, #{channelName,jdbcType=VARCHAR}, ", |
||||
"#{payPlatformType,jdbcType=INTEGER}, #{payPlatformMerName,jdbcType=VARCHAR}, ", |
||||
"#{payPlatformMerNo,jdbcType=VARCHAR}, #{profitSharingStatus,jdbcType=BIT}, ", |
||||
"#{profitSharingReceiversNo,jdbcType=VARCHAR}, #{profitSharingRatio,jdbcType=DECIMAL}, ", |
||||
"#{profitSharingReceiversName,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(HighGasChannelConfig record); |
||||
|
||||
@InsertProvider(type=HighGasChannelConfigSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(HighGasChannelConfig record); |
||||
|
||||
@SelectProvider(type=HighGasChannelConfigSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="channel_id", property="channelId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="channel_name", property="channelName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_platform_type", property="payPlatformType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="pay_platform_mer_name", property="payPlatformMerName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_platform_mer_no", property="payPlatformMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT), |
||||
@Result(column="profit_sharing_receivers_no", property="profitSharingReceiversNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="profit_sharing_receivers_name", property="profitSharingReceiversName", 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<HighGasChannelConfig> selectByExample(HighGasChannelConfigExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, channel_id, channel_name, pay_platform_type, pay_platform_mer_name, pay_platform_mer_no, ", |
||||
"profit_sharing_status, profit_sharing_receivers_no, profit_sharing_ratio, profit_sharing_receivers_name, ", |
||||
"`status`, create_time, update_time, ext_1, ext_2, ext_3", |
||||
"from high_gas_channel_config", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="channel_id", property="channelId", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="channel_name", property="channelName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_platform_type", property="payPlatformType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="pay_platform_mer_name", property="payPlatformMerName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="pay_platform_mer_no", property="payPlatformMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT), |
||||
@Result(column="profit_sharing_receivers_no", property="profitSharingReceiversNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="profit_sharing_receivers_name", property="profitSharingReceiversName", 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) |
||||
}) |
||||
HighGasChannelConfig selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=HighGasChannelConfigSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") HighGasChannelConfig record, @Param("example") HighGasChannelConfigExample example); |
||||
|
||||
@UpdateProvider(type=HighGasChannelConfigSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") HighGasChannelConfig record, @Param("example") HighGasChannelConfigExample example); |
||||
|
||||
@UpdateProvider(type=HighGasChannelConfigSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(HighGasChannelConfig record); |
||||
|
||||
@Update({ |
||||
"update high_gas_channel_config", |
||||
"set channel_id = #{channelId,jdbcType=INTEGER},", |
||||
"channel_name = #{channelName,jdbcType=VARCHAR},", |
||||
"pay_platform_type = #{payPlatformType,jdbcType=INTEGER},", |
||||
"pay_platform_mer_name = #{payPlatformMerName,jdbcType=VARCHAR},", |
||||
"pay_platform_mer_no = #{payPlatformMerNo,jdbcType=VARCHAR},", |
||||
"profit_sharing_status = #{profitSharingStatus,jdbcType=BIT},", |
||||
"profit_sharing_receivers_no = #{profitSharingReceiversNo,jdbcType=VARCHAR},", |
||||
"profit_sharing_ratio = #{profitSharingRatio,jdbcType=DECIMAL},", |
||||
"profit_sharing_receivers_name = #{profitSharingReceiversName,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(HighGasChannelConfig record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hai.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface HighGasChannelConfigMapperExt { |
||||
} |
@ -0,0 +1,388 @@ |
||||
package com.hai.dao; |
||||
|
||||
import com.hai.entity.HighGasChannelConfig; |
||||
import com.hai.entity.HighGasChannelConfigExample.Criteria; |
||||
import com.hai.entity.HighGasChannelConfigExample.Criterion; |
||||
import com.hai.entity.HighGasChannelConfigExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class HighGasChannelConfigSqlProvider { |
||||
|
||||
public String countByExample(HighGasChannelConfigExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("high_gas_channel_config"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(HighGasChannelConfigExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("high_gas_channel_config"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(HighGasChannelConfig record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("high_gas_channel_config"); |
||||
|
||||
if (record.getChannelId() != null) { |
||||
sql.VALUES("channel_id", "#{channelId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChannelName() != null) { |
||||
sql.VALUES("channel_name", "#{channelName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformType() != null) { |
||||
sql.VALUES("pay_platform_type", "#{payPlatformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformMerName() != null) { |
||||
sql.VALUES("pay_platform_mer_name", "#{payPlatformMerName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformMerNo() != null) { |
||||
sql.VALUES("pay_platform_mer_no", "#{payPlatformMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingStatus() != null) { |
||||
sql.VALUES("profit_sharing_status", "#{profitSharingStatus,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingReceiversNo() != null) { |
||||
sql.VALUES("profit_sharing_receivers_no", "#{profitSharingReceiversNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingRatio() != null) { |
||||
sql.VALUES("profit_sharing_ratio", "#{profitSharingRatio,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingReceiversName() != null) { |
||||
sql.VALUES("profit_sharing_receivers_name", "#{profitSharingReceiversName,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(HighGasChannelConfigExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("channel_id"); |
||||
sql.SELECT("channel_name"); |
||||
sql.SELECT("pay_platform_type"); |
||||
sql.SELECT("pay_platform_mer_name"); |
||||
sql.SELECT("pay_platform_mer_no"); |
||||
sql.SELECT("profit_sharing_status"); |
||||
sql.SELECT("profit_sharing_receivers_no"); |
||||
sql.SELECT("profit_sharing_ratio"); |
||||
sql.SELECT("profit_sharing_receivers_name"); |
||||
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_gas_channel_config"); |
||||
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) { |
||||
HighGasChannelConfig record = (HighGasChannelConfig) parameter.get("record"); |
||||
HighGasChannelConfigExample example = (HighGasChannelConfigExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_gas_channel_config"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getChannelId() != null) { |
||||
sql.SET("channel_id = #{record.channelId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChannelName() != null) { |
||||
sql.SET("channel_name = #{record.channelName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformType() != null) { |
||||
sql.SET("pay_platform_type = #{record.payPlatformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformMerName() != null) { |
||||
sql.SET("pay_platform_mer_name = #{record.payPlatformMerName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformMerNo() != null) { |
||||
sql.SET("pay_platform_mer_no = #{record.payPlatformMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingStatus() != null) { |
||||
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingReceiversNo() != null) { |
||||
sql.SET("profit_sharing_receivers_no = #{record.profitSharingReceiversNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingRatio() != null) { |
||||
sql.SET("profit_sharing_ratio = #{record.profitSharingRatio,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingReceiversName() != null) { |
||||
sql.SET("profit_sharing_receivers_name = #{record.profitSharingReceiversName,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_gas_channel_config"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("channel_id = #{record.channelId,jdbcType=INTEGER}"); |
||||
sql.SET("channel_name = #{record.channelName,jdbcType=VARCHAR}"); |
||||
sql.SET("pay_platform_type = #{record.payPlatformType,jdbcType=INTEGER}"); |
||||
sql.SET("pay_platform_mer_name = #{record.payPlatformMerName,jdbcType=VARCHAR}"); |
||||
sql.SET("pay_platform_mer_no = #{record.payPlatformMerNo,jdbcType=VARCHAR}"); |
||||
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}"); |
||||
sql.SET("profit_sharing_receivers_no = #{record.profitSharingReceiversNo,jdbcType=VARCHAR}"); |
||||
sql.SET("profit_sharing_ratio = #{record.profitSharingRatio,jdbcType=DECIMAL}"); |
||||
sql.SET("profit_sharing_receivers_name = #{record.profitSharingReceiversName,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}"); |
||||
|
||||
HighGasChannelConfigExample example = (HighGasChannelConfigExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(HighGasChannelConfig record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("high_gas_channel_config"); |
||||
|
||||
if (record.getChannelId() != null) { |
||||
sql.SET("channel_id = #{channelId,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getChannelName() != null) { |
||||
sql.SET("channel_name = #{channelName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformType() != null) { |
||||
sql.SET("pay_platform_type = #{payPlatformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformMerName() != null) { |
||||
sql.SET("pay_platform_mer_name = #{payPlatformMerName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPayPlatformMerNo() != null) { |
||||
sql.SET("pay_platform_mer_no = #{payPlatformMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingStatus() != null) { |
||||
sql.SET("profit_sharing_status = #{profitSharingStatus,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingReceiversNo() != null) { |
||||
sql.SET("profit_sharing_receivers_no = #{profitSharingReceiversNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingRatio() != null) { |
||||
sql.SET("profit_sharing_ratio = #{profitSharingRatio,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingReceiversName() != null) { |
||||
sql.SET("profit_sharing_receivers_name = #{profitSharingReceiversName,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, HighGasChannelConfigExample 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,232 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* bs_tripartite_req_log |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsTripartiteReqLog implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 日志类型 |
||||
*/ |
||||
private Integer logType; |
||||
|
||||
/** |
||||
* 日志类型名称 |
||||
*/ |
||||
private String logTypeName; |
||||
|
||||
/** |
||||
* 日志编号 |
||||
*/ |
||||
private String logSerialNo; |
||||
|
||||
/** |
||||
* 请求类型 |
||||
*/ |
||||
private Integer requestType; |
||||
|
||||
/** |
||||
* 请求URL |
||||
*/ |
||||
private String requestUrl; |
||||
|
||||
/** |
||||
* 请求参数 |
||||
*/ |
||||
private String requestContent; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
/** |
||||
* 响应内容 |
||||
*/ |
||||
private String responseContent; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Integer getLogType() { |
||||
return logType; |
||||
} |
||||
|
||||
public void setLogType(Integer logType) { |
||||
this.logType = logType; |
||||
} |
||||
|
||||
public String getLogTypeName() { |
||||
return logTypeName; |
||||
} |
||||
|
||||
public void setLogTypeName(String logTypeName) { |
||||
this.logTypeName = logTypeName; |
||||
} |
||||
|
||||
public String getLogSerialNo() { |
||||
return logSerialNo; |
||||
} |
||||
|
||||
public void setLogSerialNo(String logSerialNo) { |
||||
this.logSerialNo = logSerialNo; |
||||
} |
||||
|
||||
public Integer getRequestType() { |
||||
return requestType; |
||||
} |
||||
|
||||
public void setRequestType(Integer requestType) { |
||||
this.requestType = requestType; |
||||
} |
||||
|
||||
public String getRequestUrl() { |
||||
return requestUrl; |
||||
} |
||||
|
||||
public void setRequestUrl(String requestUrl) { |
||||
this.requestUrl = requestUrl; |
||||
} |
||||
|
||||
public String getRequestContent() { |
||||
return requestContent; |
||||
} |
||||
|
||||
public void setRequestContent(String requestContent) { |
||||
this.requestContent = requestContent; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
|
||||
public String getResponseContent() { |
||||
return responseContent; |
||||
} |
||||
|
||||
public void setResponseContent(String responseContent) { |
||||
this.responseContent = responseContent; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
BsTripartiteReqLog other = (BsTripartiteReqLog) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getLogType() == null ? other.getLogType() == null : this.getLogType().equals(other.getLogType())) |
||||
&& (this.getLogTypeName() == null ? other.getLogTypeName() == null : this.getLogTypeName().equals(other.getLogTypeName())) |
||||
&& (this.getLogSerialNo() == null ? other.getLogSerialNo() == null : this.getLogSerialNo().equals(other.getLogSerialNo())) |
||||
&& (this.getRequestType() == null ? other.getRequestType() == null : this.getRequestType().equals(other.getRequestType())) |
||||
&& (this.getRequestUrl() == null ? other.getRequestUrl() == null : this.getRequestUrl().equals(other.getRequestUrl())) |
||||
&& (this.getRequestContent() == null ? other.getRequestContent() == null : this.getRequestContent().equals(other.getRequestContent())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (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())) |
||||
&& (this.getResponseContent() == null ? other.getResponseContent() == null : this.getResponseContent().equals(other.getResponseContent())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getLogType() == null) ? 0 : getLogType().hashCode()); |
||||
result = prime * result + ((getLogTypeName() == null) ? 0 : getLogTypeName().hashCode()); |
||||
result = prime * result + ((getLogSerialNo() == null) ? 0 : getLogSerialNo().hashCode()); |
||||
result = prime * result + ((getRequestType() == null) ? 0 : getRequestType().hashCode()); |
||||
result = prime * result + ((getRequestUrl() == null) ? 0 : getRequestUrl().hashCode()); |
||||
result = prime * result + ((getRequestContent() == null) ? 0 : getRequestContent().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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()); |
||||
result = prime * result + ((getResponseContent() == null) ? 0 : getResponseContent().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(", logType=").append(logType); |
||||
sb.append(", logTypeName=").append(logTypeName); |
||||
sb.append(", logSerialNo=").append(logSerialNo); |
||||
sb.append(", requestType=").append(requestType); |
||||
sb.append(", requestUrl=").append(requestUrl); |
||||
sb.append(", requestContent=").append(requestContent); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", responseContent=").append(responseContent); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,953 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class BsTripartiteReqLogExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public BsTripartiteReqLogExample() { |
||||
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 andLogTypeIsNull() { |
||||
addCriterion("log_type is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeIsNotNull() { |
||||
addCriterion("log_type is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeEqualTo(Integer value) { |
||||
addCriterion("log_type =", value, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNotEqualTo(Integer value) { |
||||
addCriterion("log_type <>", value, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeGreaterThan(Integer value) { |
||||
addCriterion("log_type >", value, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("log_type >=", value, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeLessThan(Integer value) { |
||||
addCriterion("log_type <", value, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeLessThanOrEqualTo(Integer value) { |
||||
addCriterion("log_type <=", value, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeIn(List<Integer> values) { |
||||
addCriterion("log_type in", values, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNotIn(List<Integer> values) { |
||||
addCriterion("log_type not in", values, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeBetween(Integer value1, Integer value2) { |
||||
addCriterion("log_type between", value1, value2, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("log_type not between", value1, value2, "logType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameIsNull() { |
||||
addCriterion("log_type_name is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameIsNotNull() { |
||||
addCriterion("log_type_name is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameEqualTo(String value) { |
||||
addCriterion("log_type_name =", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameNotEqualTo(String value) { |
||||
addCriterion("log_type_name <>", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameGreaterThan(String value) { |
||||
addCriterion("log_type_name >", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameGreaterThanOrEqualTo(String value) { |
||||
addCriterion("log_type_name >=", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameLessThan(String value) { |
||||
addCriterion("log_type_name <", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameLessThanOrEqualTo(String value) { |
||||
addCriterion("log_type_name <=", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameLike(String value) { |
||||
addCriterion("log_type_name like", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameNotLike(String value) { |
||||
addCriterion("log_type_name not like", value, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameIn(List<String> values) { |
||||
addCriterion("log_type_name in", values, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameNotIn(List<String> values) { |
||||
addCriterion("log_type_name not in", values, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameBetween(String value1, String value2) { |
||||
addCriterion("log_type_name between", value1, value2, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogTypeNameNotBetween(String value1, String value2) { |
||||
addCriterion("log_type_name not between", value1, value2, "logTypeName"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoIsNull() { |
||||
addCriterion("log_serial_no is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoIsNotNull() { |
||||
addCriterion("log_serial_no is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoEqualTo(String value) { |
||||
addCriterion("log_serial_no =", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoNotEqualTo(String value) { |
||||
addCriterion("log_serial_no <>", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoGreaterThan(String value) { |
||||
addCriterion("log_serial_no >", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoGreaterThanOrEqualTo(String value) { |
||||
addCriterion("log_serial_no >=", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoLessThan(String value) { |
||||
addCriterion("log_serial_no <", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoLessThanOrEqualTo(String value) { |
||||
addCriterion("log_serial_no <=", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoLike(String value) { |
||||
addCriterion("log_serial_no like", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoNotLike(String value) { |
||||
addCriterion("log_serial_no not like", value, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoIn(List<String> values) { |
||||
addCriterion("log_serial_no in", values, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoNotIn(List<String> values) { |
||||
addCriterion("log_serial_no not in", values, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoBetween(String value1, String value2) { |
||||
addCriterion("log_serial_no between", value1, value2, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andLogSerialNoNotBetween(String value1, String value2) { |
||||
addCriterion("log_serial_no not between", value1, value2, "logSerialNo"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeIsNull() { |
||||
addCriterion("request_type is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeIsNotNull() { |
||||
addCriterion("request_type is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeEqualTo(Integer value) { |
||||
addCriterion("request_type =", value, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeNotEqualTo(Integer value) { |
||||
addCriterion("request_type <>", value, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeGreaterThan(Integer value) { |
||||
addCriterion("request_type >", value, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("request_type >=", value, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeLessThan(Integer value) { |
||||
addCriterion("request_type <", value, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeLessThanOrEqualTo(Integer value) { |
||||
addCriterion("request_type <=", value, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeIn(List<Integer> values) { |
||||
addCriterion("request_type in", values, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeNotIn(List<Integer> values) { |
||||
addCriterion("request_type not in", values, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeBetween(Integer value1, Integer value2) { |
||||
addCriterion("request_type between", value1, value2, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestTypeNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("request_type not between", value1, value2, "requestType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlIsNull() { |
||||
addCriterion("request_url is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlIsNotNull() { |
||||
addCriterion("request_url is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlEqualTo(String value) { |
||||
addCriterion("request_url =", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlNotEqualTo(String value) { |
||||
addCriterion("request_url <>", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlGreaterThan(String value) { |
||||
addCriterion("request_url >", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlGreaterThanOrEqualTo(String value) { |
||||
addCriterion("request_url >=", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlLessThan(String value) { |
||||
addCriterion("request_url <", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlLessThanOrEqualTo(String value) { |
||||
addCriterion("request_url <=", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlLike(String value) { |
||||
addCriterion("request_url like", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlNotLike(String value) { |
||||
addCriterion("request_url not like", value, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlIn(List<String> values) { |
||||
addCriterion("request_url in", values, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlNotIn(List<String> values) { |
||||
addCriterion("request_url not in", values, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlBetween(String value1, String value2) { |
||||
addCriterion("request_url between", value1, value2, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestUrlNotBetween(String value1, String value2) { |
||||
addCriterion("request_url not between", value1, value2, "requestUrl"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentIsNull() { |
||||
addCriterion("request_content is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentIsNotNull() { |
||||
addCriterion("request_content is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentEqualTo(String value) { |
||||
addCriterion("request_content =", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentNotEqualTo(String value) { |
||||
addCriterion("request_content <>", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentGreaterThan(String value) { |
||||
addCriterion("request_content >", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentGreaterThanOrEqualTo(String value) { |
||||
addCriterion("request_content >=", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentLessThan(String value) { |
||||
addCriterion("request_content <", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentLessThanOrEqualTo(String value) { |
||||
addCriterion("request_content <=", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentLike(String value) { |
||||
addCriterion("request_content like", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentNotLike(String value) { |
||||
addCriterion("request_content not like", value, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentIn(List<String> values) { |
||||
addCriterion("request_content in", values, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentNotIn(List<String> values) { |
||||
addCriterion("request_content not in", values, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentBetween(String value1, String value2) { |
||||
addCriterion("request_content between", value1, value2, "requestContent"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andRequestContentNotBetween(String value1, String value2) { |
||||
addCriterion("request_content not between", value1, value2, "requestContent"); |
||||
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 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,297 @@ |
||||
package com.hai.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* high_gas_channel_config |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class HighGasChannelConfig implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 渠道id 1:自建站 2:团油 3:加好油 4:金猪加油 |
||||
*/ |
||||
private Integer channelId; |
||||
|
||||
/** |
||||
* 渠道名称 |
||||
*/ |
||||
private String channelName; |
||||
|
||||
/** |
||||
* 平台类型 1:微信 |
||||
*/ |
||||
private Integer payPlatformType; |
||||
|
||||
/** |
||||
* 商户名称 |
||||
*/ |
||||
private String payPlatformMerName; |
||||
|
||||
/** |
||||
* 商户号 |
||||
*/ |
||||
private String payPlatformMerNo; |
||||
|
||||
/** |
||||
* 是否分账 |
||||
*/ |
||||
private Boolean profitSharingStatus; |
||||
|
||||
/** |
||||
* 分账接收方账户 |
||||
*/ |
||||
private String profitSharingReceiversNo; |
||||
|
||||
/** |
||||
* 分账比率 |
||||
*/ |
||||
private BigDecimal profitSharingRatio; |
||||
|
||||
/** |
||||
* 分账接收方名称 |
||||
*/ |
||||
private String profitSharingReceiversName; |
||||
|
||||
/** |
||||
* 状态 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 Integer getChannelId() { |
||||
return channelId; |
||||
} |
||||
|
||||
public void setChannelId(Integer channelId) { |
||||
this.channelId = channelId; |
||||
} |
||||
|
||||
public String getChannelName() { |
||||
return channelName; |
||||
} |
||||
|
||||
public void setChannelName(String channelName) { |
||||
this.channelName = channelName; |
||||
} |
||||
|
||||
public Integer getPayPlatformType() { |
||||
return payPlatformType; |
||||
} |
||||
|
||||
public void setPayPlatformType(Integer payPlatformType) { |
||||
this.payPlatformType = payPlatformType; |
||||
} |
||||
|
||||
public String getPayPlatformMerName() { |
||||
return payPlatformMerName; |
||||
} |
||||
|
||||
public void setPayPlatformMerName(String payPlatformMerName) { |
||||
this.payPlatformMerName = payPlatformMerName; |
||||
} |
||||
|
||||
public String getPayPlatformMerNo() { |
||||
return payPlatformMerNo; |
||||
} |
||||
|
||||
public void setPayPlatformMerNo(String payPlatformMerNo) { |
||||
this.payPlatformMerNo = payPlatformMerNo; |
||||
} |
||||
|
||||
public Boolean getProfitSharingStatus() { |
||||
return profitSharingStatus; |
||||
} |
||||
|
||||
public void setProfitSharingStatus(Boolean profitSharingStatus) { |
||||
this.profitSharingStatus = profitSharingStatus; |
||||
} |
||||
|
||||
public String getProfitSharingReceiversNo() { |
||||
return profitSharingReceiversNo; |
||||
} |
||||
|
||||
public void setProfitSharingReceiversNo(String profitSharingReceiversNo) { |
||||
this.profitSharingReceiversNo = profitSharingReceiversNo; |
||||
} |
||||
|
||||
public BigDecimal getProfitSharingRatio() { |
||||
return profitSharingRatio; |
||||
} |
||||
|
||||
public void setProfitSharingRatio(BigDecimal profitSharingRatio) { |
||||
this.profitSharingRatio = profitSharingRatio; |
||||
} |
||||
|
||||
public String getProfitSharingReceiversName() { |
||||
return profitSharingReceiversName; |
||||
} |
||||
|
||||
public void setProfitSharingReceiversName(String profitSharingReceiversName) { |
||||
this.profitSharingReceiversName = profitSharingReceiversName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
HighGasChannelConfig other = (HighGasChannelConfig) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId())) |
||||
&& (this.getChannelName() == null ? other.getChannelName() == null : this.getChannelName().equals(other.getChannelName())) |
||||
&& (this.getPayPlatformType() == null ? other.getPayPlatformType() == null : this.getPayPlatformType().equals(other.getPayPlatformType())) |
||||
&& (this.getPayPlatformMerName() == null ? other.getPayPlatformMerName() == null : this.getPayPlatformMerName().equals(other.getPayPlatformMerName())) |
||||
&& (this.getPayPlatformMerNo() == null ? other.getPayPlatformMerNo() == null : this.getPayPlatformMerNo().equals(other.getPayPlatformMerNo())) |
||||
&& (this.getProfitSharingStatus() == null ? other.getProfitSharingStatus() == null : this.getProfitSharingStatus().equals(other.getProfitSharingStatus())) |
||||
&& (this.getProfitSharingReceiversNo() == null ? other.getProfitSharingReceiversNo() == null : this.getProfitSharingReceiversNo().equals(other.getProfitSharingReceiversNo())) |
||||
&& (this.getProfitSharingRatio() == null ? other.getProfitSharingRatio() == null : this.getProfitSharingRatio().equals(other.getProfitSharingRatio())) |
||||
&& (this.getProfitSharingReceiversName() == null ? other.getProfitSharingReceiversName() == null : this.getProfitSharingReceiversName().equals(other.getProfitSharingReceiversName())) |
||||
&& (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 + ((getChannelId() == null) ? 0 : getChannelId().hashCode()); |
||||
result = prime * result + ((getChannelName() == null) ? 0 : getChannelName().hashCode()); |
||||
result = prime * result + ((getPayPlatformType() == null) ? 0 : getPayPlatformType().hashCode()); |
||||
result = prime * result + ((getPayPlatformMerName() == null) ? 0 : getPayPlatformMerName().hashCode()); |
||||
result = prime * result + ((getPayPlatformMerNo() == null) ? 0 : getPayPlatformMerNo().hashCode()); |
||||
result = prime * result + ((getProfitSharingStatus() == null) ? 0 : getProfitSharingStatus().hashCode()); |
||||
result = prime * result + ((getProfitSharingReceiversNo() == null) ? 0 : getProfitSharingReceiversNo().hashCode()); |
||||
result = prime * result + ((getProfitSharingRatio() == null) ? 0 : getProfitSharingRatio().hashCode()); |
||||
result = prime * result + ((getProfitSharingReceiversName() == null) ? 0 : getProfitSharingReceiversName().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(", channelId=").append(channelId); |
||||
sb.append(", channelName=").append(channelName); |
||||
sb.append(", payPlatformType=").append(payPlatformType); |
||||
sb.append(", payPlatformMerName=").append(payPlatformMerName); |
||||
sb.append(", payPlatformMerNo=").append(payPlatformMerNo); |
||||
sb.append(", profitSharingStatus=").append(profitSharingStatus); |
||||
sb.append(", profitSharingReceiversNo=").append(profitSharingReceiversNo); |
||||
sb.append(", profitSharingRatio=").append(profitSharingRatio); |
||||
sb.append(", profitSharingReceiversName=").append(profitSharingReceiversName); |
||||
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,46 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 加油站渠道商 |
||||
*/ |
||||
public enum GasChannel { |
||||
type1(1 , "自建站"), |
||||
type2(2 , "团油"), |
||||
type3(3 , "加好油"), |
||||
type4(4 , "金猪加油"), |
||||
; |
||||
|
||||
private Integer type; |
||||
private String name; |
||||
|
||||
GasChannel(int type , String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public static GasChannel getChannelByType(Integer type) { |
||||
for (GasChannel ele : values()) { |
||||
if(Objects.equals(type,ele.getType())) return ele; |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
|
||||
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,42 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 渠道商支付平台类型 |
||||
*/ |
||||
public enum GasChannelPayPlatformType { |
||||
type1(1 , "微信"), |
||||
; |
||||
|
||||
private Integer type; |
||||
private String name; |
||||
|
||||
GasChannelPayPlatformType(int type , String name) { |
||||
this.type = type; |
||||
this.name = name; |
||||
} |
||||
|
||||
public static GasChannelPayPlatformType getPlatformByType(Integer type) { |
||||
for (GasChannelPayPlatformType ele : values()) { |
||||
if(Objects.equals(type,ele.getType())) return ele; |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
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; |
||||
|
||||
/** |
||||
* 三方日志 - 请求类型 |
||||
*/ |
||||
public enum TripartiteReqLogReqType { |
||||
type1(1, "请求"), |
||||
type2(2, "响应"), |
||||
; |
||||
|
||||
private Integer type; |
||||
|
||||
private String name; |
||||
|
||||
TripartiteReqLogReqType(Integer 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,41 @@ |
||||
package com.hai.enum_type; |
||||
|
||||
/** |
||||
* 三方日志 - 日志类型 |
||||
*/ |
||||
public enum TripartiteReqLogType { |
||||
type1(1, "团油"), |
||||
type2(2, "壳牌"), |
||||
type3(3, "汇联通工会卡"), |
||||
type4(4, "贵州中石化"), |
||||
type5(5, "千猪肯德基"), |
||||
type6(6, "千猪星巴克"), |
||||
type7(7, "千猪话费"), |
||||
; |
||||
|
||||
private Integer type; |
||||
|
||||
private String name; |
||||
|
||||
TripartiteReqLogType(Integer 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,22 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.enum_type.TripartiteReqLogReqType; |
||||
import com.hai.enum_type.TripartiteReqLogType; |
||||
|
||||
/** |
||||
* 三方请求日志 |
||||
*/ |
||||
public interface BsTripartiteReqLogService { |
||||
|
||||
/** |
||||
* 插入日志 |
||||
* @param logType 日志类型 |
||||
* @param logSerialNo 日志编号 |
||||
* @param reqType 请求类型 |
||||
* @param reqUrl 请求url |
||||
* @param reqContent 请求内容 |
||||
* @param respContent 响应内容 |
||||
*/ |
||||
void insert(TripartiteReqLogType logType, String logSerialNo, TripartiteReqLogReqType reqType, String reqUrl, String reqContent, String respContent); |
||||
|
||||
} |
@ -0,0 +1,26 @@ |
||||
package com.hai.service; |
||||
|
||||
import com.hai.entity.HighGasChannelConfig; |
||||
import com.hai.enum_type.GasChannel; |
||||
import com.hai.enum_type.GasChannelPayPlatformType; |
||||
|
||||
/** |
||||
* 加油站 渠道商配置 |
||||
*/ |
||||
public interface HighGasChannelConfigService { |
||||
|
||||
/** |
||||
* 编辑配置 |
||||
* @param gasChannelConfig |
||||
*/ |
||||
void editConfig(HighGasChannelConfig gasChannelConfig); |
||||
|
||||
/** |
||||
* 查询配置 |
||||
* @param channelId 渠道id |
||||
* @param payPlatformType 支付平台类型 |
||||
* @return |
||||
*/ |
||||
HighGasChannelConfig getConfig(GasChannel channelId, GasChannelPayPlatformType payPlatformType); |
||||
|
||||
} |
@ -0,0 +1,13 @@ |
||||
package com.hai.service; |
||||
|
||||
/** |
||||
* 加油站服务 |
||||
*/ |
||||
public interface HighGasService { |
||||
|
||||
/** |
||||
* 获取渠道商【加好油】全量加油站 |
||||
*/ |
||||
void getJiaHaoYouAllStation() throws Exception; |
||||
|
||||
} |
@ -0,0 +1,36 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.hai.dao.BsTripartiteReqLogMapper; |
||||
import com.hai.entity.BsTripartiteReqLog; |
||||
import com.hai.enum_type.TripartiteReqLogReqType; |
||||
import com.hai.enum_type.TripartiteReqLogType; |
||||
import com.hai.service.BsTripartiteReqLogService; |
||||
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.util.Date; |
||||
|
||||
@Service("tripartiteReqLogService") |
||||
public class BsTripartiteReqLogServiceImpl implements BsTripartiteReqLogService { |
||||
|
||||
@Resource |
||||
private BsTripartiteReqLogMapper tripartiteReqLogMapper; |
||||
|
||||
@Override |
||||
@Transactional(propagation = Propagation.NOT_SUPPORTED, isolation = Isolation.READ_UNCOMMITTED) |
||||
public void insert(TripartiteReqLogType logType, String logSerialNo, TripartiteReqLogReqType reqType, String reqUrl, String reqContent, String respContent) { |
||||
BsTripartiteReqLog log = new BsTripartiteReqLog(); |
||||
log.setLogType(logType.getType()); |
||||
log.setLogTypeName(logType.getName()); |
||||
log.setLogSerialNo(logSerialNo); |
||||
log.setRequestType(reqType.getType()); |
||||
log.setRequestUrl(reqUrl); |
||||
log.setRequestContent(reqContent); |
||||
log.setResponseContent(respContent); |
||||
log.setCreateTime(new Date()); |
||||
tripartiteReqLogMapper.insert(log); |
||||
} |
||||
} |
@ -0,0 +1,48 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.hai.dao.HighGasChannelConfigMapper; |
||||
import com.hai.entity.HighGasChannelConfig; |
||||
import com.hai.entity.HighGasChannelConfigExample; |
||||
import com.hai.enum_type.GasChannel; |
||||
import com.hai.enum_type.GasChannelPayPlatformType; |
||||
import com.hai.service.HighGasChannelConfigService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
@Service("gasChannelConfigService") |
||||
public class HighGasChannelConfigServiceImpl implements HighGasChannelConfigService { |
||||
|
||||
@Resource |
||||
private HighGasChannelConfigMapper gasChannelConfigMapper; |
||||
|
||||
|
||||
@Override |
||||
public void editConfig(HighGasChannelConfig gasChannelConfig) { |
||||
if (gasChannelConfig.getId() == null) { |
||||
gasChannelConfig.setStatus(1); |
||||
gasChannelConfig.setCreateTime(new Date()); |
||||
gasChannelConfig.setUpdateTime(new Date()); |
||||
gasChannelConfigMapper.insert(gasChannelConfig); |
||||
} else { |
||||
gasChannelConfig.setUpdateTime(new Date()); |
||||
gasChannelConfigMapper.updateByPrimaryKey(gasChannelConfig); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public HighGasChannelConfig getConfig(GasChannel channelId, GasChannelPayPlatformType payPlatformType) { |
||||
HighGasChannelConfigExample example = new HighGasChannelConfigExample(); |
||||
example.createCriteria() |
||||
.andChannelIdEqualTo(channelId.getType()) |
||||
.andPayPlatformTypeEqualTo(payPlatformType.getType()) |
||||
.andStatusEqualTo(1); |
||||
List<HighGasChannelConfig> list = gasChannelConfigMapper.selectByExample(example); |
||||
if (list.size() > 0) { |
||||
return list.get(0); |
||||
} |
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,232 @@ |
||||
package com.hai.service.impl; |
||||
|
||||
import com.alibaba.fastjson.JSON; |
||||
import com.alibaba.fastjson.JSONArray; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hai.config.CommonSysConst; |
||||
import com.hai.config.ShellGroupService; |
||||
import com.hai.entity.HighGasOilGunNo; |
||||
import com.hai.entity.HighGasOilPrice; |
||||
import com.hai.entity.HighMerchantStore; |
||||
import com.hai.enum_type.MerchantStoreSourceType; |
||||
import com.hai.model.HighMerchantModel; |
||||
import com.hai.model.HighMerchantStoreModel; |
||||
import com.hai.service.*; |
||||
import org.springframework.beans.BeanUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
@Service("gasService") |
||||
public class HighGasServiceImpl implements HighGasService { |
||||
|
||||
@Resource |
||||
private ShellGroupService shellGroupService; |
||||
|
||||
@Resource |
||||
private HighMerchantService highMerchantService; |
||||
|
||||
@Resource |
||||
private HighMerchantStoreService highMerchantStoreService; |
||||
|
||||
@Resource |
||||
private HighGasOilPriceService highGasOilPriceService; |
||||
|
||||
@Resource |
||||
private HighGasOilGunNoService gasOilGunNoService; |
||||
|
||||
@Override |
||||
public void getJiaHaoYouAllStation() throws Exception { |
||||
HighMerchantModel merchant = highMerchantService.getDetailByKey("HF0801103821"); |
||||
|
||||
JSONObject pObject = shellGroupService.gasPageQueryAllStation(1, 50); |
||||
JSONObject pageInfo = JSON.parseObject(pObject.getString("pageInfo"), JSONObject.class); |
||||
|
||||
// 总页数
|
||||
Integer totalPageNo = pageInfo.getBigDecimal("totalCount").divide(pageInfo.getBigDecimal("pageSize"),0, BigDecimal.ROUND_CEILING).intValue(); |
||||
for (int pageNum = 1; pageNum <= totalPageNo; pageNum++) { |
||||
|
||||
// 查询加油站列表
|
||||
JSONObject respObject = shellGroupService.gasPageQueryAllStation(pageNum, 50); |
||||
JSONArray stationArray = JSONObject.parseObject(respObject.getString("infoList"), JSONArray.class); |
||||
for (Object stationObject : stationArray) { |
||||
JSONObject station = (JSONObject) stationObject; |
||||
|
||||
// 查询油站
|
||||
HighMerchantStore store = highMerchantStoreService.getMerStoreDetailByKey(station.getString("stationCode")); |
||||
|
||||
if (store != null) { |
||||
store.setPrestoreType(0); |
||||
store.setMerchantId(merchant.getId()); |
||||
store.setCompanyId(merchant.getCompanyId()); |
||||
store.setStoreKey(station.getString("stationCode")); |
||||
store.setStoreName(station.getString("stationName")); |
||||
store.setStoreLogo(CommonSysConst.getSysConfig().getGasDefaultOilStationImg()); |
||||
store.setRegionId(station.getLong("provinceId")); |
||||
store.setRegionName(station.getString("provinceName")); |
||||
store.setAddress(station.getString("stationAddress")); |
||||
store.setLongitude(station.getString("longitude")); |
||||
store.setLatitude(station.getString("latitude")); |
||||
store.setStatus(station.getString("status").equals("ABLE")?1:2); |
||||
store.setOperatorId(0L); |
||||
store.setOperatorName("系统创建"); |
||||
store.setUpdateTime(new Date()); |
||||
highMerchantStoreService.updateMerchantStoreDetail(store); |
||||
|
||||
JSONArray oilPriceList = station.getJSONArray("oilPriceList"); |
||||
for (Object oilPrice : oilPriceList) { |
||||
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
||||
// 查询门店油号
|
||||
HighGasOilPrice highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getInteger("goodsCode")); |
||||
if (highGasOilPrice == null) { |
||||
highGasOilPrice = new HighGasOilPrice(); |
||||
highGasOilPrice.setMerchantStoreId(store.getId()); |
||||
highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); |
||||
highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); |
||||
highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); |
||||
highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
||||
highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
||||
highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); |
||||
|
||||
// 油品类型 1:汽油:2:柴油;3:天然气
|
||||
if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { |
||||
highGasOilPrice.setOilType(1); |
||||
highGasOilPrice.setOilTypeName("汽油"); |
||||
} else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { |
||||
highGasOilPrice.setOilType(2); |
||||
highGasOilPrice.setOilTypeName("柴油"); |
||||
} else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { |
||||
highGasOilPrice.setOilType(3); |
||||
highGasOilPrice.setOilTypeName("天然气"); |
||||
} |
||||
highGasOilPriceService.editGasOilPrice(highGasOilPrice); |
||||
|
||||
JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); |
||||
for (Object o : oilGunNoList) { |
||||
HighGasOilGunNo gasOilGunNo = gasOilGunNoService.getDetailByStoreAndGunNo(highGasOilPrice.getMerchantStoreId(), Integer.parseInt(o.toString())); |
||||
if (gasOilGunNo == null) { |
||||
gasOilGunNo = new HighGasOilGunNo(); |
||||
gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); |
||||
gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); |
||||
gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); |
||||
gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); |
||||
gasOilGunNo.setOilType(highGasOilPrice.getOilType()); |
||||
gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); |
||||
gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); |
||||
gasOilGunNo.setStatus(1); |
||||
gasOilGunNoService.editGunNo(gasOilGunNo); |
||||
} |
||||
} |
||||
|
||||
} else { |
||||
highGasOilPrice.setMerchantStoreId(store.getId()); |
||||
highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); |
||||
highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); |
||||
highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); |
||||
highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
||||
highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
||||
highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); |
||||
|
||||
// 油品类型 1:汽油:2:柴油;3:天然气
|
||||
if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { |
||||
highGasOilPrice.setOilType(1); |
||||
highGasOilPrice.setOilTypeName("汽油"); |
||||
} else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { |
||||
highGasOilPrice.setOilType(2); |
||||
highGasOilPrice.setOilTypeName("柴油"); |
||||
} else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { |
||||
highGasOilPrice.setOilType(3); |
||||
highGasOilPrice.setOilTypeName("天然气"); |
||||
} |
||||
highGasOilPriceService.editGasOilPrice(highGasOilPrice); |
||||
|
||||
JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); |
||||
for (Object o : oilGunNoList) { |
||||
HighGasOilGunNo gasOilGunNo = gasOilGunNoService.getDetailByStoreAndGunNo(highGasOilPrice.getMerchantStoreId(), Integer.parseInt(o.toString())); |
||||
if (gasOilGunNo == null) { |
||||
gasOilGunNo = new HighGasOilGunNo(); |
||||
gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); |
||||
gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); |
||||
gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); |
||||
gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); |
||||
gasOilGunNo.setOilType(highGasOilPrice.getOilType()); |
||||
gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); |
||||
gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); |
||||
gasOilGunNo.setStatus(1); |
||||
gasOilGunNoService.editGunNo(gasOilGunNo); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} else { |
||||
store = new HighMerchantStore(); |
||||
store.setPrestoreType(0); |
||||
store.setType(1); |
||||
store.setSourceType(MerchantStoreSourceType.type3.getNumber()); |
||||
store.setMerchantId(merchant.getId()); |
||||
store.setCompanyId(merchant.getCompanyId()); |
||||
store.setStoreKey(station.getString("stationCode")); |
||||
store.setStoreName(station.getString("stationName")); |
||||
store.setStoreLogo(CommonSysConst.getSysConfig().getGasDefaultOilStationImg()); |
||||
store.setRegionId(station.getLong("provinceId")); |
||||
store.setRegionName(station.getString("provinceName")); |
||||
store.setAddress(station.getString("stationAddress")); |
||||
store.setLongitude(station.getString("longitude")); |
||||
store.setLatitude(station.getString("latitude")); |
||||
store.setStatus(station.getString("status").equals("ABLE")?1:2); |
||||
store.setOperatorId(0L); |
||||
store.setOperatorName("系统创建"); |
||||
store.setCreateTime(new Date()); |
||||
store.setUpdateTime(new Date()); |
||||
|
||||
HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); |
||||
BeanUtils.copyProperties(store, merchantStoreModel); |
||||
highMerchantStoreService.insertMerchantStore(merchantStoreModel); |
||||
|
||||
JSONArray oilPriceList = station.getJSONArray("oilPriceList"); |
||||
for (Object oilPrice : oilPriceList) { |
||||
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
||||
HighGasOilPrice highGasOilPrice = new HighGasOilPrice(); |
||||
highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); |
||||
highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); |
||||
highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); |
||||
highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); |
||||
highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); |
||||
highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
||||
highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
||||
highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); |
||||
|
||||
// 油品类型 1:汽油:2:柴油;3:天然气
|
||||
if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { |
||||
highGasOilPrice.setOilType(1); |
||||
highGasOilPrice.setOilTypeName("汽油"); |
||||
} else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { |
||||
highGasOilPrice.setOilType(2); |
||||
highGasOilPrice.setOilTypeName("柴油"); |
||||
} else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { |
||||
highGasOilPrice.setOilType(3); |
||||
highGasOilPrice.setOilTypeName("天然气"); |
||||
} |
||||
highGasOilPriceService.editGasOilPrice(highGasOilPrice); |
||||
|
||||
JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); |
||||
for (Object o : oilGunNoList) { |
||||
HighGasOilGunNo gasOilGunNo = new HighGasOilGunNo(); |
||||
gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); |
||||
gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); |
||||
gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); |
||||
gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); |
||||
gasOilGunNo.setOilType(highGasOilPrice.getOilType()); |
||||
gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); |
||||
gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); |
||||
gasOilGunNo.setStatus(1); |
||||
gasOilGunNoService.editGunNo(gasOilGunNo); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue