commit
76066bf98e
@ -0,0 +1,121 @@ |
||||
package com.bweb.controller.recharge; |
||||
|
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
import com.hfkj.common.utils.ResponseMsgUtil; |
||||
|
||||
import com.hfkj.entity.RechargePrice; |
||||
import com.hfkj.model.ResponseData; |
||||
import com.hfkj.service.recharge.PriceService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Date; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
@Controller |
||||
@RequestMapping(value="/price") |
||||
@Api(value="话费金额") |
||||
public class PriceController { |
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(PriceController.class); |
||||
|
||||
@Resource |
||||
private PriceService priceService; |
||||
|
||||
@RequestMapping(value="/getListPrice",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询列表") |
||||
public ResponseData getListPrice( |
||||
@RequestParam(value = "type" , required = false) Integer type, |
||||
@RequestParam(value = "pageNum" , required = true) Integer pageNum, |
||||
@RequestParam(value = "pageSize" , required = true) Integer pageSize) { |
||||
try { |
||||
|
||||
Map<String , Object> map = new HashMap<>(); |
||||
map.put("type", type); |
||||
|
||||
PageHelper.startPage(pageNum, pageSize); |
||||
return ResponseMsgUtil.success(new PageInfo<>(priceService.getList(map))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value = "/editPrice", method = RequestMethod.POST) |
||||
@ResponseBody |
||||
@ApiOperation(value = "编辑金额") |
||||
public ResponseData editPrice(@RequestBody RechargePrice body) { |
||||
try { |
||||
|
||||
if (body == null |
||||
|| body.getPrice() == null |
||||
|| body.getPayPrice() == null |
||||
|| body.getSort() == null |
||||
|| body.getType() == null |
||||
) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
||||
} |
||||
|
||||
RechargePrice rechargePrice; |
||||
|
||||
if (body.getId() != null) { |
||||
// 查询品牌
|
||||
rechargePrice = priceService.queryDetail(body.getId()); |
||||
if (rechargePrice == null) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.CONTENT_NOT_FOUND, ""); |
||||
} |
||||
} else { |
||||
rechargePrice = new RechargePrice(); |
||||
rechargePrice.setCreateTime(new Date()); |
||||
} |
||||
|
||||
rechargePrice.setUpdateTime(new Date()); |
||||
rechargePrice.setPayPrice(body.getPayPrice()); |
||||
rechargePrice.setPrice(body.getPrice()); |
||||
rechargePrice.setType(body.getType()); |
||||
rechargePrice.setSort(body.getSort()); |
||||
rechargePrice.setStatus(1); |
||||
|
||||
if (body.getId() != null) { |
||||
priceService.update(rechargePrice); |
||||
} else { |
||||
priceService.create(rechargePrice); |
||||
} |
||||
|
||||
return ResponseMsgUtil.success("操作成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("OutRechargePriceController --> insertPrice() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
|
||||
} |
||||
|
||||
@RequestMapping(value="/delete",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "删除") |
||||
public ResponseData delete(@RequestParam(value = "id" , required = false) Long id) { |
||||
try { |
||||
|
||||
priceService.delete(id , false); |
||||
|
||||
return ResponseMsgUtil.success("删除成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,252 @@ |
||||
package com.cweb.controller.qianZhu; |
||||
|
||||
import com.hfkj.common.utils.DateUtil; |
||||
import com.hfkj.common.utils.ResponseMsgUtil; |
||||
import com.hfkj.model.ResponseData; |
||||
import com.hfkj.qianzhu.channel.CinemaService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
@Controller |
||||
@RequestMapping(value="/cinema") |
||||
@Api(value="电影票数据") |
||||
public class CinemaController { |
||||
|
||||
Logger log = LoggerFactory.getLogger(CinemaController.class); |
||||
|
||||
@RequestMapping(value="/filmsPagedQuery",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "根据城市分页查询影片") |
||||
public ResponseData filmsPagedQuery(@RequestParam(value = "cityId", required = false) Integer cityId, |
||||
@RequestParam(value = "cityCode", required = false) String cityCode, |
||||
@RequestParam(value = "cinemaId", required = false) String cinemaId, |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize |
||||
) { |
||||
try { |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
if (cityId != null) { |
||||
params.put("cityId", cityId); |
||||
} |
||||
if (cityCode != null) { |
||||
params.put("cityCode", cityCode); |
||||
} |
||||
if (cinemaId != null) { |
||||
params.put("cinemaId", cinemaId); |
||||
} |
||||
params.put("pageIndex", pageNum); |
||||
params.put("pageSize", pageSize); |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.filmsPagedQuery(params)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value="/pagedQueryNotShownFilms",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "分页查询待上映影片") |
||||
public ResponseData pagedQueryNotShownFilms( |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize |
||||
) { |
||||
try { |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
params.put("pageIndex", pageNum); |
||||
params.put("pageSize", pageSize); |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.pagedQueryNotShownFilms(params)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value="/cinemaBrands",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询所有影院品牌") |
||||
public ResponseData cinemaBrands( |
||||
) { |
||||
try { |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.cinemaBrands()); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
|
||||
@RequestMapping(value="/cinemasPagedQuery",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "分页查询城市影院") |
||||
public ResponseData cinemasPagedQuery(@RequestParam(value = "cityId", required = false) Integer cityId, |
||||
@RequestParam(value = "cityCode", required = false) String cityCode, |
||||
@RequestParam(value = "regionId", required = false) Integer regionId, |
||||
@RequestParam(value = "cinemaId", required = false) String cinemaId, |
||||
@RequestParam(value = "showDate", required = false) String showDate, |
||||
@RequestParam(value = "brandKeyword", required = false) String brandKeyword, |
||||
@RequestParam(name = "lon", required = true) BigDecimal lon, |
||||
@RequestParam(name = "lat", required = true) BigDecimal lat, |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize |
||||
) { |
||||
try { |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
|
||||
if (cityId != null) { |
||||
params.put("cityId", cityId); |
||||
} |
||||
if (cityCode != null) { |
||||
params.put("cityCode", cityCode); |
||||
} |
||||
if (cinemaId != null) { |
||||
params.put("cinemaId", cinemaId); |
||||
} |
||||
if (regionId != null) { |
||||
params.put("regionId", regionId); |
||||
} |
||||
if (brandKeyword != null) { |
||||
params.put("brandKeyword", brandKeyword); |
||||
} |
||||
|
||||
params.put("lon", lon); |
||||
params.put("lat", lat); |
||||
params.put("showDate", showDate); |
||||
params.put("pageIndex", pageNum); |
||||
params.put("pageSize", pageSize); |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.cinemasPagedQuery(params)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value="/listByCinemaId",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "根据影院id查询影片") |
||||
public ResponseData listByCinemaId( |
||||
@RequestParam(name = "cinemaId", required = true) Integer cinemaId |
||||
) { |
||||
try { |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
params.put("cinemaId", cinemaId); |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.listByCinemaId(params)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value="/listByCinemaAndFilm",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "根据影院和影片查询场次") |
||||
public ResponseData listByCinemaAndFilm( |
||||
@RequestParam(name = "cinemaId", required = true) Integer cinemaId, |
||||
@RequestParam(name = "filmId", required = true) Integer filmId |
||||
) { |
||||
try { |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
params.put("cinemaId", cinemaId); |
||||
params.put("filmId", filmId); |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.listByCinemaAndFilm(params)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value="/pagedQuery",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "分页查询场次") |
||||
public ResponseData pagedQuery( |
||||
@RequestParam(name = "cityId", required = false) Integer cityId, |
||||
@RequestParam(name = "cityCode", required = false) String cityCode, |
||||
@RequestParam(name = "cinemaId", required = false) Integer cinemaId, |
||||
@RequestParam(name = "filmId", required = false) Integer filmId, |
||||
@RequestParam(value = "showTimeBeginTime" , required = false) Long showTimeBeginTime, |
||||
@RequestParam(value = "showTimeEndTime" , required = false) Long showTimeEndTime, |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize |
||||
) { |
||||
try { |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
|
||||
if (cityId != null) { |
||||
params.put("cityId", cityId); |
||||
} |
||||
if (cityCode != null) { |
||||
params.put("cityCode", cityCode); |
||||
} |
||||
if (cinemaId != null) { |
||||
params.put("cinemaId", cinemaId); |
||||
} |
||||
if (filmId != null) { |
||||
params.put("filmId", filmId); |
||||
} |
||||
if (showTimeBeginTime != null) { |
||||
params.put("showTimeBeginTime", showTimeBeginTime); |
||||
} |
||||
if (showTimeEndTime != null) { |
||||
params.put("showTimeEndTime", showTimeEndTime); |
||||
} |
||||
|
||||
params.put("pageIndex", pageNum); |
||||
params.put("pageSize", pageSize); |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.pagedQuery(params)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
|
||||
@RequestMapping(value="/getRealTimeSeatByShowId",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "查询场次实时座位") |
||||
public ResponseData getRealTimeSeatByShowId( |
||||
@RequestParam(name = "showId", required = true) Long showId |
||||
) { |
||||
try { |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
params.put("showId", showId); |
||||
|
||||
return ResponseMsgUtil.success(CinemaService.getRealTimeSeatByShowId(params)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,139 @@ |
||||
package com.hfkj.config; |
||||
|
||||
import com.hfkj.common.pay.util.sdk.WXPayConstants; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
|
||||
import javax.crypto.Mac; |
||||
import javax.crypto.spec.SecretKeySpec; |
||||
import java.security.MessageDigest; |
||||
import java.util.Arrays; |
||||
import java.util.Map; |
||||
import java.util.Set; |
||||
|
||||
public class GenerateSign { |
||||
|
||||
|
||||
|
||||
/** |
||||
* 生成签名 |
||||
* @param data 数据 |
||||
* @param key 秘钥app_secret |
||||
* @return 加密结果 |
||||
*/ |
||||
public static String paramSort(final Map<String, Object> data, String key){ |
||||
Set<String> keySet = data.keySet(); |
||||
String[] keyArray = keySet.toArray(new String[keySet.size()]); |
||||
Arrays.sort(keyArray); |
||||
StringBuilder sb = new StringBuilder(); |
||||
for (String k : keyArray) { |
||||
if (k.equals(WXPayConstants.FIELD_SIGN)) { |
||||
continue; |
||||
} |
||||
if (StringUtils.isBlank(sb.toString())) { |
||||
sb.append(k).append("=").append(data.get(k)); |
||||
} else { |
||||
sb.append("&").append(k).append("=").append(data.get(k)); |
||||
} |
||||
} |
||||
sb.append(key); |
||||
return sb.toString(); |
||||
} |
||||
|
||||
/** |
||||
* @MethodName paramSort |
||||
* @Description: 不带key |
||||
* @param param |
||||
* @return: java.lang.String |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 上午11:48 |
||||
*/ |
||||
public static String paramSort(final Map<String, Object> param) { |
||||
Set<String> keySet = param.keySet(); |
||||
String[] keyArray = keySet.toArray(new String[keySet.size()]); |
||||
StringBuilder sb = new StringBuilder(); |
||||
for (String k : keyArray) { |
||||
if (StringUtils.isBlank(sb.toString())) { |
||||
sb.append(k).append("=").append(param.get(k)); |
||||
} else { |
||||
sb.append("&").append(k).append("=").append(param.get(k)); |
||||
} |
||||
} |
||||
return sb.toString(); |
||||
} |
||||
|
||||
/** |
||||
* 生成畅停签名. 注意,若含有sign_type字段,必须和signType参数保持一致。 |
||||
* |
||||
* @param data 待签名数据 |
||||
* @param key API密钥 |
||||
* @param signType 签名方式 |
||||
* @return 签名 |
||||
*/ |
||||
public static String generateSignatureCt(final Map<String, Object> data, String key, WXPayConstants.SignType signType) throws Exception { |
||||
|
||||
|
||||
Set<String> keySet = data.keySet(); |
||||
String[] keyArray = keySet.toArray(new String[keySet.size()]); |
||||
StringBuilder sb = new StringBuilder(); |
||||
for (String k : keyArray) { |
||||
if (k.equals(WXPayConstants.FIELD_SIGN)) { |
||||
continue; |
||||
} |
||||
if (data.get(k) != null) // 参数值为空,则不参与签名
|
||||
sb.append(k).append(data.get(k)); |
||||
} |
||||
sb.append("secretKey").append(key); |
||||
if (WXPayConstants.SignType.MD5.equals(signType)) { |
||||
return MD5(sb.toString() , false); |
||||
} |
||||
else if (WXPayConstants.SignType.HMACSHA256.equals(signType)) { |
||||
return HMACSHA256(sb.toString(), key); |
||||
} |
||||
else { |
||||
throw new Exception(String.format("Invalid sign_type: %s", signType)); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
/** |
||||
* 生成 MD5 |
||||
* |
||||
* @param data 待处理数据 |
||||
* @return MD5结果 |
||||
*/ |
||||
public static String MD5(String data , Boolean isUpperCase) throws Exception { |
||||
java.security.MessageDigest md = MessageDigest.getInstance("MD5"); |
||||
byte[] array = md.digest(data.getBytes("UTF-8")); |
||||
StringBuilder sb = new StringBuilder(); |
||||
for (byte item : array) { |
||||
sb.append(Integer.toHexString((item & 0xFF) | 0x100).substring(1, 3)); |
||||
} |
||||
if (isUpperCase) { |
||||
return sb.toString().toUpperCase(); |
||||
} else { |
||||
return sb.toString(); |
||||
} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 生成 HMACSHA256 |
||||
* @param data 待处理数据 |
||||
* @param key 密钥 |
||||
* @return 加密结果 |
||||
* @throws Exception |
||||
*/ |
||||
public static String HMACSHA256(String data, String key) throws Exception { |
||||
Mac sha256_HMAC = Mac.getInstance("HmacSHA256"); |
||||
SecretKeySpec secret_key = new SecretKeySpec(key.getBytes("UTF-8"), "HmacSHA256"); |
||||
sha256_HMAC.init(secret_key); |
||||
byte[] array = sha256_HMAC.doFinal(data.getBytes("UTF-8")); |
||||
StringBuilder sb = new StringBuilder(); |
||||
for (byte item : array) { |
||||
sb.append(Integer.toHexString((item & 0xFF) | 0x100).substring(1, 3)); |
||||
} |
||||
return sb.toString().toUpperCase(); |
||||
} |
||||
} |
@ -0,0 +1,117 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.RechargeCode; |
||||
import com.hfkj.entity.RechargeCodeExample; |
||||
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 RechargeCodeMapper extends RechargeCodeMapperExt { |
||||
@SelectProvider(type=RechargeCodeSqlProvider.class, method="countByExample") |
||||
long countByExample(RechargeCodeExample example); |
||||
|
||||
@DeleteProvider(type=RechargeCodeSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(RechargeCodeExample example); |
||||
|
||||
@Delete({ |
||||
"delete from recharge_code", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into recharge_code (price_id, platform_type, ", |
||||
"goods_id, create_time, ", |
||||
"update_time, `status`, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{priceId,jdbcType=VARCHAR}, #{platformType,jdbcType=INTEGER}, ", |
||||
"#{goodsId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(RechargeCode record); |
||||
|
||||
@InsertProvider(type=RechargeCodeSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(RechargeCode record); |
||||
|
||||
@SelectProvider(type=RechargeCodeSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="price_id", property="priceId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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<RechargeCode> selectByExample(RechargeCodeExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, price_id, platform_type, goods_id, create_time, update_time, `status`, ext_1, ", |
||||
"ext_2, ext_3", |
||||
"from recharge_code", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="price_id", property="priceId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
RechargeCode selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=RechargeCodeSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") RechargeCode record, @Param("example") RechargeCodeExample example); |
||||
|
||||
@UpdateProvider(type=RechargeCodeSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") RechargeCode record, @Param("example") RechargeCodeExample example); |
||||
|
||||
@UpdateProvider(type=RechargeCodeSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(RechargeCode record); |
||||
|
||||
@Update({ |
||||
"update recharge_code", |
||||
"set price_id = #{priceId,jdbcType=VARCHAR},", |
||||
"platform_type = #{platformType,jdbcType=INTEGER},", |
||||
"goods_id = #{goodsId,jdbcType=VARCHAR},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(RechargeCode record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface RechargeCodeMapperExt { |
||||
} |
@ -0,0 +1,304 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.RechargeCode; |
||||
import com.hfkj.entity.RechargeCodeExample.Criteria; |
||||
import com.hfkj.entity.RechargeCodeExample.Criterion; |
||||
import com.hfkj.entity.RechargeCodeExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class RechargeCodeSqlProvider { |
||||
|
||||
public String countByExample(RechargeCodeExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("recharge_code"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(RechargeCodeExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("recharge_code"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(RechargeCode record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("recharge_code"); |
||||
|
||||
if (record.getPriceId() != null) { |
||||
sql.VALUES("price_id", "#{priceId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformType() != null) { |
||||
sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.VALUES("goods_id", "#{goodsId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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(RechargeCodeExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("price_id"); |
||||
sql.SELECT("platform_type"); |
||||
sql.SELECT("goods_id"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("recharge_code"); |
||||
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) { |
||||
RechargeCode record = (RechargeCode) parameter.get("record"); |
||||
RechargeCodeExample example = (RechargeCodeExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("recharge_code"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getPriceId() != null) { |
||||
sql.SET("price_id = #{record.priceId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformType() != null) { |
||||
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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("recharge_code"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("price_id = #{record.priceId,jdbcType=VARCHAR}"); |
||||
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=VARCHAR}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
RechargeCodeExample example = (RechargeCodeExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(RechargeCode record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("recharge_code"); |
||||
|
||||
if (record.getPriceId() != null) { |
||||
sql.SET("price_id = #{priceId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getPlatformType() != null) { |
||||
sql.SET("platform_type = #{platformType,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.SET("goods_id = #{goodsId,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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, RechargeCodeExample 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,122 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.RechargePrice; |
||||
import com.hfkj.entity.RechargePriceExample; |
||||
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 RechargePriceMapper extends RechargePriceMapperExt { |
||||
@SelectProvider(type=RechargePriceSqlProvider.class, method="countByExample") |
||||
long countByExample(RechargePriceExample example); |
||||
|
||||
@DeleteProvider(type=RechargePriceSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(RechargePriceExample example); |
||||
|
||||
@Delete({ |
||||
"delete from recharge_price", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into recharge_price (`type`, sort, ", |
||||
"price, pay_price, ", |
||||
"create_time, update_time, ", |
||||
"`status`, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values (#{type,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, ", |
||||
"#{price,jdbcType=DECIMAL}, #{payPrice,jdbcType=DECIMAL}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", |
||||
"#{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(RechargePrice record); |
||||
|
||||
@InsertProvider(type=RechargePriceSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(RechargePrice record); |
||||
|
||||
@SelectProvider(type=RechargePriceSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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<RechargePrice> selectByExample(RechargePriceExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, `type`, sort, price, pay_price, create_time, update_time, `status`, ext_1, ", |
||||
"ext_2, ext_3", |
||||
"from recharge_price", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@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) |
||||
}) |
||||
RechargePrice selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=RechargePriceSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") RechargePrice record, @Param("example") RechargePriceExample example); |
||||
|
||||
@UpdateProvider(type=RechargePriceSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") RechargePrice record, @Param("example") RechargePriceExample example); |
||||
|
||||
@UpdateProvider(type=RechargePriceSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(RechargePrice record); |
||||
|
||||
@Update({ |
||||
"update recharge_price", |
||||
"set `type` = #{type,jdbcType=INTEGER},", |
||||
"sort = #{sort,jdbcType=INTEGER},", |
||||
"price = #{price,jdbcType=DECIMAL},", |
||||
"pay_price = #{payPrice,jdbcType=DECIMAL},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(RechargePrice record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface RechargePriceMapperExt { |
||||
} |
@ -0,0 +1,318 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.RechargePrice; |
||||
import com.hfkj.entity.RechargePriceExample.Criteria; |
||||
import com.hfkj.entity.RechargePriceExample.Criterion; |
||||
import com.hfkj.entity.RechargePriceExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class RechargePriceSqlProvider { |
||||
|
||||
public String countByExample(RechargePriceExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("recharge_price"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(RechargePriceExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("recharge_price"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(RechargePrice record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("recharge_price"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSort() != null) { |
||||
sql.VALUES("sort", "#{sort,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.VALUES("price", "#{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getPayPrice() != null) { |
||||
sql.VALUES("pay_price", "#{payPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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(RechargePriceExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("sort"); |
||||
sql.SELECT("price"); |
||||
sql.SELECT("pay_price"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("recharge_price"); |
||||
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) { |
||||
RechargePrice record = (RechargePrice) parameter.get("record"); |
||||
RechargePriceExample example = (RechargePriceExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("recharge_price"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSort() != null) { |
||||
sql.SET("sort = #{record.sort,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getPayPrice() != null) { |
||||
sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
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.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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("recharge_price"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("sort = #{record.sort,jdbcType=INTEGER}"); |
||||
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); |
||||
sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
RechargePriceExample example = (RechargePriceExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(RechargePrice record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("recharge_price"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getSort() != null) { |
||||
sql.SET("sort = #{sort,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getPrice() != null) { |
||||
sql.SET("price = #{price,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getPayPrice() != null) { |
||||
sql.SET("pay_price = #{payPrice,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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, RechargePriceExample 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,209 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* recharge_code |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class RechargeCode implements Serializable { |
||||
/** |
||||
* 主键id |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 金额id |
||||
*/ |
||||
private String priceId; |
||||
|
||||
/** |
||||
* 充值平台:充值平台 1:尖椒 2:龙阅 4.畅停 5.简牛 |
||||
*/ |
||||
private Integer platformType; |
||||
|
||||
/** |
||||
* 产品id |
||||
*/ |
||||
private String goodsId; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 状态 1正常 0 禁用 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* ext_1 |
||||
*/ |
||||
private String ext1; |
||||
|
||||
/** |
||||
* ext_2 |
||||
*/ |
||||
private String ext2; |
||||
|
||||
/** |
||||
* ext_3 |
||||
*/ |
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getPriceId() { |
||||
return priceId; |
||||
} |
||||
|
||||
public void setPriceId(String priceId) { |
||||
this.priceId = priceId; |
||||
} |
||||
|
||||
public Integer getPlatformType() { |
||||
return platformType; |
||||
} |
||||
|
||||
public void setPlatformType(Integer platformType) { |
||||
this.platformType = platformType; |
||||
} |
||||
|
||||
public String getGoodsId() { |
||||
return goodsId; |
||||
} |
||||
|
||||
public void setGoodsId(String goodsId) { |
||||
this.goodsId = goodsId; |
||||
} |
||||
|
||||
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 Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
RechargeCode other = (RechargeCode) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getPriceId() == null ? other.getPriceId() == null : this.getPriceId().equals(other.getPriceId())) |
||||
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType())) |
||||
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (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 + ((getPriceId() == null) ? 0 : getPriceId().hashCode()); |
||||
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode()); |
||||
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", priceId=").append(priceId); |
||||
sb.append(", platformType=").append(platformType); |
||||
sb.append(", goodsId=").append(goodsId); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,873 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class RechargeCodeExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public RechargeCodeExample() { |
||||
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 andPriceIdIsNull() { |
||||
addCriterion("price_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdIsNotNull() { |
||||
addCriterion("price_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdEqualTo(String value) { |
||||
addCriterion("price_id =", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdNotEqualTo(String value) { |
||||
addCriterion("price_id <>", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdGreaterThan(String value) { |
||||
addCriterion("price_id >", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdGreaterThanOrEqualTo(String value) { |
||||
addCriterion("price_id >=", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdLessThan(String value) { |
||||
addCriterion("price_id <", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdLessThanOrEqualTo(String value) { |
||||
addCriterion("price_id <=", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdLike(String value) { |
||||
addCriterion("price_id like", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdNotLike(String value) { |
||||
addCriterion("price_id not like", value, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdIn(List<String> values) { |
||||
addCriterion("price_id in", values, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdNotIn(List<String> values) { |
||||
addCriterion("price_id not in", values, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdBetween(String value1, String value2) { |
||||
addCriterion("price_id between", value1, value2, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIdNotBetween(String value1, String value2) { |
||||
addCriterion("price_id not between", value1, value2, "priceId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeIsNull() { |
||||
addCriterion("platform_type is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeIsNotNull() { |
||||
addCriterion("platform_type is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeEqualTo(Integer value) { |
||||
addCriterion("platform_type =", value, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeNotEqualTo(Integer value) { |
||||
addCriterion("platform_type <>", value, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeGreaterThan(Integer value) { |
||||
addCriterion("platform_type >", value, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("platform_type >=", value, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeLessThan(Integer value) { |
||||
addCriterion("platform_type <", value, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeLessThanOrEqualTo(Integer value) { |
||||
addCriterion("platform_type <=", value, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeIn(List<Integer> values) { |
||||
addCriterion("platform_type in", values, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeNotIn(List<Integer> values) { |
||||
addCriterion("platform_type not in", values, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeBetween(Integer value1, Integer value2) { |
||||
addCriterion("platform_type between", value1, value2, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPlatformTypeNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("platform_type not between", value1, value2, "platformType"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdIsNull() { |
||||
addCriterion("goods_id is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdIsNotNull() { |
||||
addCriterion("goods_id is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdEqualTo(String value) { |
||||
addCriterion("goods_id =", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdNotEqualTo(String value) { |
||||
addCriterion("goods_id <>", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdGreaterThan(String value) { |
||||
addCriterion("goods_id >", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdGreaterThanOrEqualTo(String value) { |
||||
addCriterion("goods_id >=", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdLessThan(String value) { |
||||
addCriterion("goods_id <", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdLessThanOrEqualTo(String value) { |
||||
addCriterion("goods_id <=", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdLike(String value) { |
||||
addCriterion("goods_id like", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdNotLike(String value) { |
||||
addCriterion("goods_id not like", value, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdIn(List<String> values) { |
||||
addCriterion("goods_id in", values, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdNotIn(List<String> values) { |
||||
addCriterion("goods_id not in", values, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdBetween(String value1, String value2) { |
||||
addCriterion("goods_id between", value1, value2, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andGoodsIdNotBetween(String value1, String value2) { |
||||
addCriterion("goods_id not between", value1, value2, "goodsId"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNull() { |
||||
addCriterion("create_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNotNull() { |
||||
addCriterion("create_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) { |
||||
addCriterion("create_time =", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) { |
||||
addCriterion("create_time <>", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) { |
||||
addCriterion("create_time >", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("create_time >=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) { |
||||
addCriterion("create_time <", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("create_time <=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) { |
||||
addCriterion("create_time in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) { |
||||
addCriterion("create_time not in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("create_time between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("create_time not between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNull() { |
||||
addCriterion("update_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNotNull() { |
||||
addCriterion("update_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) { |
||||
addCriterion("update_time =", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
||||
addCriterion("update_time <>", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) { |
||||
addCriterion("update_time >", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("update_time >=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) { |
||||
addCriterion("update_time <", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("update_time <=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) { |
||||
addCriterion("update_time in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
||||
addCriterion("update_time not in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("update_time between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("update_time not between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNull() { |
||||
addCriterion("`status` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNotNull() { |
||||
addCriterion("`status` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusEqualTo(Integer value) { |
||||
addCriterion("`status` =", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) { |
||||
addCriterion("`status` <>", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) { |
||||
addCriterion("`status` >", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` >=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThan(Integer value) { |
||||
addCriterion("`status` <", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` <=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIn(List<Integer> values) { |
||||
addCriterion("`status` in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) { |
||||
addCriterion("`status` not in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` not between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria 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,217 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* recharge_price |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class RechargePrice implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 1 电信 2.移动 3.联通 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 排序 |
||||
*/ |
||||
private Integer sort; |
||||
|
||||
/** |
||||
* 充值金额 |
||||
*/ |
||||
private BigDecimal price; |
||||
|
||||
/** |
||||
* 支付金额 |
||||
*/ |
||||
private BigDecimal payPrice; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 0:删除 1:上线 2:已售空 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
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 getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public Integer getSort() { |
||||
return sort; |
||||
} |
||||
|
||||
public void setSort(Integer sort) { |
||||
this.sort = sort; |
||||
} |
||||
|
||||
public BigDecimal getPrice() { |
||||
return price; |
||||
} |
||||
|
||||
public void setPrice(BigDecimal price) { |
||||
this.price = price; |
||||
} |
||||
|
||||
public BigDecimal getPayPrice() { |
||||
return payPrice; |
||||
} |
||||
|
||||
public void setPayPrice(BigDecimal payPrice) { |
||||
this.payPrice = payPrice; |
||||
} |
||||
|
||||
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 Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
RechargePrice other = (RechargePrice) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort())) |
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) |
||||
&& (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (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 + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode()); |
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); |
||||
result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", type=").append(type); |
||||
sb.append(", sort=").append(sort); |
||||
sb.append(", price=").append(price); |
||||
sb.append(", payPrice=").append(payPrice); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
@ -0,0 +1,914 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
public class RechargePriceExample { |
||||
protected String orderByClause; |
||||
|
||||
protected boolean distinct; |
||||
|
||||
protected List<Criteria> oredCriteria; |
||||
|
||||
private Integer limit; |
||||
|
||||
private Long offset; |
||||
|
||||
public RechargePriceExample() { |
||||
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 andTypeIsNull() { |
||||
addCriterion("`type` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeIsNotNull() { |
||||
addCriterion("`type` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeEqualTo(Integer value) { |
||||
addCriterion("`type` =", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeNotEqualTo(Integer value) { |
||||
addCriterion("`type` <>", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeGreaterThan(Integer value) { |
||||
addCriterion("`type` >", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`type` >=", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeLessThan(Integer value) { |
||||
addCriterion("`type` <", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`type` <=", value, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeIn(List<Integer> values) { |
||||
addCriterion("`type` in", values, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeNotIn(List<Integer> values) { |
||||
addCriterion("`type` not in", values, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeBetween(Integer value1, Integer value2) { |
||||
addCriterion("`type` between", value1, value2, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andTypeNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`type` not between", value1, value2, "type"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortIsNull() { |
||||
addCriterion("sort is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortIsNotNull() { |
||||
addCriterion("sort is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortEqualTo(Integer value) { |
||||
addCriterion("sort =", value, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortNotEqualTo(Integer value) { |
||||
addCriterion("sort <>", value, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortGreaterThan(Integer value) { |
||||
addCriterion("sort >", value, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("sort >=", value, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortLessThan(Integer value) { |
||||
addCriterion("sort <", value, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortLessThanOrEqualTo(Integer value) { |
||||
addCriterion("sort <=", value, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortIn(List<Integer> values) { |
||||
addCriterion("sort in", values, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortNotIn(List<Integer> values) { |
||||
addCriterion("sort not in", values, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortBetween(Integer value1, Integer value2) { |
||||
addCriterion("sort between", value1, value2, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andSortNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("sort not between", value1, value2, "sort"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIsNull() { |
||||
addCriterion("price is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIsNotNull() { |
||||
addCriterion("price is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceEqualTo(BigDecimal value) { |
||||
addCriterion("price =", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceNotEqualTo(BigDecimal value) { |
||||
addCriterion("price <>", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceGreaterThan(BigDecimal value) { |
||||
addCriterion("price >", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("price >=", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceLessThan(BigDecimal value) { |
||||
addCriterion("price <", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceLessThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("price <=", value, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceIn(List<BigDecimal> values) { |
||||
addCriterion("price in", values, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceNotIn(List<BigDecimal> values) { |
||||
addCriterion("price not in", values, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("price between", value1, value2, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("price not between", value1, value2, "price"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceIsNull() { |
||||
addCriterion("pay_price is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceIsNotNull() { |
||||
addCriterion("pay_price is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceEqualTo(BigDecimal value) { |
||||
addCriterion("pay_price =", value, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceNotEqualTo(BigDecimal value) { |
||||
addCriterion("pay_price <>", value, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceGreaterThan(BigDecimal value) { |
||||
addCriterion("pay_price >", value, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceGreaterThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("pay_price >=", value, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceLessThan(BigDecimal value) { |
||||
addCriterion("pay_price <", value, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceLessThanOrEqualTo(BigDecimal value) { |
||||
addCriterion("pay_price <=", value, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceIn(List<BigDecimal> values) { |
||||
addCriterion("pay_price in", values, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceNotIn(List<BigDecimal> values) { |
||||
addCriterion("pay_price not in", values, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("pay_price between", value1, value2, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andPayPriceNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
addCriterion("pay_price not between", value1, value2, "payPrice"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNull() { |
||||
addCriterion("create_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIsNotNull() { |
||||
addCriterion("create_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) { |
||||
addCriterion("create_time =", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) { |
||||
addCriterion("create_time <>", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) { |
||||
addCriterion("create_time >", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("create_time >=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) { |
||||
addCriterion("create_time <", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("create_time <=", value, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) { |
||||
addCriterion("create_time in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) { |
||||
addCriterion("create_time not in", values, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("create_time between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("create_time not between", value1, value2, "createTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNull() { |
||||
addCriterion("update_time is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIsNotNull() { |
||||
addCriterion("update_time is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) { |
||||
addCriterion("update_time =", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
||||
addCriterion("update_time <>", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) { |
||||
addCriterion("update_time >", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
||||
addCriterion("update_time >=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) { |
||||
addCriterion("update_time <", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
||||
addCriterion("update_time <=", value, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) { |
||||
addCriterion("update_time in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
||||
addCriterion("update_time not in", values, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
||||
addCriterion("update_time between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
||||
addCriterion("update_time not between", value1, value2, "updateTime"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNull() { |
||||
addCriterion("`status` is null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIsNotNull() { |
||||
addCriterion("`status` is not null"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusEqualTo(Integer value) { |
||||
addCriterion("`status` =", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotEqualTo(Integer value) { |
||||
addCriterion("`status` <>", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThan(Integer value) { |
||||
addCriterion("`status` >", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` >=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThan(Integer value) { |
||||
addCriterion("`status` <", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Integer value) { |
||||
addCriterion("`status` <=", value, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusIn(List<Integer> values) { |
||||
addCriterion("`status` in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotIn(List<Integer> values) { |
||||
addCriterion("`status` not in", values, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria andStatusNotBetween(Integer value1, Integer value2) { |
||||
addCriterion("`status` not between", value1, value2, "status"); |
||||
return (Criteria) this; |
||||
} |
||||
|
||||
public Criteria 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,33 @@ |
||||
package com.hfkj.phone; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @ClassName CtPhoneBillService |
||||
* @Author Sum1Dream |
||||
* @Description 畅停话费话费充值 |
||||
* @Date 2024/6/19 上午10:55 |
||||
**/ |
||||
public class CtPhoneBillService { |
||||
|
||||
/** |
||||
* @MethodName recharge |
||||
* @Description: 查询畅停订单下单 |
||||
* @param map |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 下午2:06 |
||||
*/ |
||||
public static void recharge(Map<String , Object> map)throws Exception { |
||||
PhoneBillService.requestCt("/external/api/telPay" , map); |
||||
} |
||||
|
||||
/** |
||||
* @MethodName searchOrder |
||||
* @Description:畅停话费查询订单详情 |
||||
* @param map |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 下午2:06 |
||||
*/ |
||||
public static void searchOrder(Map<String , Object> map)throws Exception { |
||||
PhoneBillService.requestCt("/external/api/searchOrder" , map); |
||||
} |
||||
} |
@ -0,0 +1,52 @@ |
||||
package com.hfkj.phone; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.common.pay.util.sdk.WXPayConstants; |
||||
import com.hfkj.common.utils.HttpsUtils; |
||||
import com.hfkj.config.CommonSysConst; |
||||
import com.hfkj.config.GenerateSign; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @ClassName PhoneBillService |
||||
* @Author Sum1Dream |
||||
* @Description 话费 |
||||
* @Date 2024/6/19 上午11:29 |
||||
**/ |
||||
public class PhoneBillService { |
||||
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(PhoneBillService.class); |
||||
|
||||
/** |
||||
* 请求 |
||||
* @param postUrl 接口请求地址 |
||||
* @param param 参数 |
||||
* @return |
||||
* @throws Exception |
||||
*/ |
||||
public static JSONObject requestCt(String postUrl, Map<String,Object> param) throws Exception { |
||||
|
||||
log.info("============ 话费请求-START ============="); |
||||
param.put("mchid" , CommonSysConst.getSysConfig().getCtMemberId()); |
||||
param.put("sign", GenerateSign.generateSignatureCt(param , CommonSysConst.getSysConfig().getCtApiKey() , WXPayConstants.SignType.MD5)); |
||||
log.info("请求接口:" + postUrl); |
||||
log.info("请求参数:" + JSONObject.toJSONString(param)); |
||||
|
||||
JSONObject response = HttpsUtils.doPostForm(CommonSysConst.getSysConfig().getCtPostUrl() + postUrl, GenerateSign.paramSort(param) , new HashMap<>()); |
||||
|
||||
log.info("响应参数:" + response.toJSONString()); |
||||
log.info("============ 话费请求-END =============="); |
||||
return response; |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,180 @@ |
||||
package com.hfkj.qianzhu.channel; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @ClassName CinemaService |
||||
* @Author Sum1Dream |
||||
* @Description 电影票请求 |
||||
* @Date 2024/6/11 上午11:31 |
||||
**/ |
||||
public class CinemaService { |
||||
|
||||
/** |
||||
* @MethodName filmsPagedQuery |
||||
* @Description: 根据城市分页查询影片 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/11 上午11:45 |
||||
*/ |
||||
public static JSONObject filmsPagedQuery(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/films/filmsPagedQuery" , map); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName pagedQueryNotShownFilms |
||||
* @Description:分页查询待上映影片 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/11 下午3:01 |
||||
*/ |
||||
public static JSONObject pagedQueryNotShownFilms(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/films/pagedQueryNotShownFilms" , map); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName cinemaBrands |
||||
* @Description:查询所有影院品牌 |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/11 下午3:21 |
||||
*/ |
||||
public static JSONObject cinemaBrands() throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/cinema-brands/listAll" , new HashMap<>()); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName cinemasPagedQuery |
||||
* @Description:分页查询城市影院 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/11 下午3:31 |
||||
*/ |
||||
public static JSONObject cinemasPagedQuery(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v2/cinemas/pagedQuery" , map); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName listByCinemaId |
||||
* @Description:根据影院id查询影片 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/11 下午4:09 |
||||
*/ |
||||
public static JSONObject listByCinemaId(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/films/listByCinemaId" , map); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName listByCinemaAndFilm |
||||
* @Description:根据影院和影片查询场次 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/13 下午5:48 |
||||
*/ |
||||
public static JSONObject listByCinemaAndFilm(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/films/listByCinemaAndFilm" , map); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName pagedQuery |
||||
* @Description: 分页查询场次 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/25 上午9:58 |
||||
*/ |
||||
public static JSONObject pagedQuery(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v2/shows/pagedQuery" , map); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @MethodName getRealTimeSeatByShowId |
||||
* @Description:查询场次实时座位 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/25 上午10:23 |
||||
*/ |
||||
public static JSONObject getRealTimeSeatByShowId(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/shows/getRealTimeSeatByShowId" , map); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,107 @@ |
||||
package com.hfkj.qianzhu.channel; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @ClassName KfcService |
||||
* @Author Sum1Dream |
||||
* @Description |
||||
* @Date 2024/6/17 下午5:55 |
||||
**/ |
||||
public class KfcService { |
||||
|
||||
/** |
||||
* @MethodName getByOrderNo |
||||
* @Description: 根据订单号查询订单详情 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/17 下午6:00 |
||||
*/ |
||||
public static JSONObject getByOrderNo(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/kfcOrders/getByOrderNo" , map); |
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @MethodName payKfcOrder |
||||
* @Description:支付订单 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/17 下午6:07 |
||||
*/ |
||||
public static JSONObject payKfcOrder(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/orders/payKfcOrder" , map); |
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @MethodName listAll |
||||
* @Description:查询KFC门店 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/17 下午6:10 |
||||
*/ |
||||
public static JSONObject listAll(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v2/kfcStores/listAll" , map); |
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @MethodName listByStoreCode |
||||
* @Description:查询KFC门店菜单 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/17 下午6:11 |
||||
*/ |
||||
public static JSONObject listByStoreCode(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v1/kfcMenus/listByStoreCode" , map); |
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @MethodName createKfcOrder |
||||
* @Description:创建kfc订单 |
||||
* @param map |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/17 下午6:12 |
||||
*/ |
||||
public static JSONObject createKfcOrder(Map<String , Object> map) throws Exception { |
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v4/orders/createKfcOrder" , map); |
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,116 @@ |
||||
package com.hfkj.qianzhu.channel; |
||||
|
||||
import com.alibaba.fastjson.JSON; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
import com.hfkj.common.utils.HttpsUtils; |
||||
import com.hfkj.common.utils.MD5Util; |
||||
import com.hfkj.common.utils.WxUtils; |
||||
import com.hfkj.config.CommonSysConst; |
||||
import com.hfkj.config.GenerateSign; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import java.util.*; |
||||
|
||||
public class QianZhuService { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(QianZhuService.class); |
||||
|
||||
/** |
||||
* 请求 |
||||
* @param postUrl 接口请求地址 |
||||
* @param param 参数 |
||||
* @return |
||||
* @throws Exception |
||||
*/ |
||||
public static JSONObject request(String postUrl, Map<String,Object> param) throws Exception { |
||||
|
||||
log.info("============ 千猪请求-START ============="); |
||||
param.put("platformId", CommonSysConst.getSysConfig().getQianZhuPlatformId()); |
||||
param.put("timestamp", new Date().getTime()); |
||||
param.put("sign", MD5Util.encode(GenerateSign.paramSort(param,CommonSysConst.getSysConfig().getQianZhuSecret()).getBytes()).toLowerCase()); |
||||
|
||||
log.info("请求接口:" + postUrl); |
||||
log.info("请求参数:" + JSONObject.toJSONString(param)); |
||||
|
||||
JSONObject response = HttpsUtils.doPost(CommonSysConst.getSysConfig().getQianZhuUrl()+ postUrl, JSONObject.toJSONString(param)); |
||||
|
||||
log.info("响应参数:" + response.toJSONString()); |
||||
log.info("============ 千猪请求-END =============="); |
||||
return response; |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 请求 |
||||
* @param postUrl 接口请求地址 |
||||
* @param map 参数 |
||||
* @return |
||||
* @throws Exception |
||||
*/ |
||||
public static JSONObject requestH5(String postUrl, Map<String,Object> map) throws Exception { |
||||
|
||||
log.info("============ 千猪请求-START ============="); |
||||
Map<String,Object> param = new HashMap<>(); |
||||
param.put("platformId", CommonSysConst.getSysConfig().getQianZhuPlatformId()); |
||||
param.put("timestamp", new Date().getTime()); |
||||
map.put("action", postUrl); |
||||
param.put("content", JSON.toJSONString(map)); |
||||
param.put("version", "1.0"); |
||||
param.put("traceId", WxUtils.makeNonStr()); |
||||
param.put("sign", MD5Util.encode(GenerateSign.paramSort(param,CommonSysConst.getSysConfig().getQianZhuSecret()).getBytes()).toLowerCase()); |
||||
|
||||
log.info("请求接口:" + postUrl); |
||||
log.info("请求参数:" + JSONObject.toJSONString(param)); |
||||
|
||||
JSONObject response = HttpsUtils.doPost(CommonSysConst.getSysConfig().getQianZhuH5url(), JSONObject.toJSONString(param)); |
||||
|
||||
log.info("响应参数:" + response.toJSONString()); |
||||
log.info("============ 千猪请求-END =============="); |
||||
return response; |
||||
|
||||
} |
||||
|
||||
/** |
||||
* @Author Sum1Dream |
||||
* @name getAllCities.java |
||||
* @Description // 查询所有城市
|
||||
* @Date 15:45 2022/6/28 |
||||
* @Param [] |
||||
* @return com.alibaba.fastjson.JSONObject |
||||
*/ |
||||
public static JSONObject getAllCities() throws Exception { |
||||
|
||||
|
||||
JSONObject object = QianZhuService.request("/openApi/v2/cities/listAll" , new HashMap<>()); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @MethodName listByCityId |
||||
* @Description:查询城市区域 |
||||
* @param |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/11 下午3:12 |
||||
*/ |
||||
public static JSONObject listByCityId(Map<String,Object> param) throws Exception { |
||||
JSONObject object = QianZhuService.request("/openApi/v1/regions/listByCityId" , param); |
||||
|
||||
if (object.getBoolean("success") && object.getInteger("code") == 10000) { |
||||
return object; |
||||
} else { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,57 @@ |
||||
package com.hfkj.service.recharge; |
||||
|
||||
import com.hfkj.entity.RechargePrice; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface PriceService { |
||||
|
||||
/** |
||||
* @MethodName create |
||||
* @Description: 创建 |
||||
* @param rechargePrice |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 下午3:15 |
||||
*/ |
||||
void create(RechargePrice rechargePrice); |
||||
|
||||
/** |
||||
* @MethodName update |
||||
* @Description: 更新 |
||||
* @param rechargePrice |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 下午3:15 |
||||
*/ |
||||
void update(RechargePrice rechargePrice); |
||||
|
||||
/** |
||||
* @MethodName delete |
||||
* @Description:删除 |
||||
* @param id |
||||
* @param fullDelete |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 下午3:15 |
||||
*/ |
||||
void delete(Long id , Boolean fullDelete); |
||||
|
||||
/** |
||||
* @MethodName queryDetail |
||||
* @Description: 查询 |
||||
* @param id |
||||
* @return: com.hfkj.entity.RechargePrice |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 下午3:15 |
||||
*/ |
||||
RechargePrice queryDetail(Long id); |
||||
|
||||
/** |
||||
* @MethodName getList |
||||
* @Description: 查询列表 |
||||
* @param map |
||||
* @return: java.util.List<com.hfkj.entity.RechargePrice> |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/19 下午3:16 |
||||
*/ |
||||
List<RechargePrice> getList(Map<String , Object> map); |
||||
} |
@ -0,0 +1,63 @@ |
||||
package com.hfkj.service.recharge; |
||||
|
||||
import com.hfkj.entity.RechargeCode; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @ClassName RechargeCodeService |
||||
* @Author Sum1Dream |
||||
* @Description |
||||
* @Date 2024/6/24 下午3:07 |
||||
**/ |
||||
public interface RechargeCodeService { |
||||
|
||||
/** |
||||
* @MethodName create |
||||
* @Description: 创建 |
||||
* @param rechargeCode |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/24 下午3:10 |
||||
*/ |
||||
void create(RechargeCode rechargeCode); |
||||
|
||||
/** |
||||
* @MethodName update |
||||
* @Description: 更新 |
||||
* @param rechargeCode |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/24 下午3:11 |
||||
*/ |
||||
void update(RechargeCode rechargeCode); |
||||
|
||||
/** |
||||
* @MethodName delete |
||||
* @Description: 删除 |
||||
* @param id |
||||
* @param fullDelete |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/24 下午3:11 |
||||
*/ |
||||
void delete(Long id , Boolean fullDelete); |
||||
|
||||
/** |
||||
* @MethodName queryDetail |
||||
* @Description: 查询详情 |
||||
* @param id |
||||
* @return: com.hfkj.entity.RechargeCode |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/24 下午3:11 |
||||
*/ |
||||
RechargeCode queryDetail(Long id); |
||||
|
||||
/** |
||||
* @MethodName getList |
||||
* @Description: 查询列表 |
||||
* @param map |
||||
* @return: java.util.List<com.hfkj.entity.RechargeCode> |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/6/24 下午3:11 |
||||
*/ |
||||
List<RechargeCode> getList(Map<String , Object> map); |
||||
} |
@ -0,0 +1,64 @@ |
||||
package com.hfkj.service.recharge.impl; |
||||
|
||||
import com.hfkj.dao.RechargePriceMapper; |
||||
import com.hfkj.entity.BsOrderGoods; |
||||
import com.hfkj.entity.RechargePrice; |
||||
import com.hfkj.entity.RechargePriceExample; |
||||
import com.hfkj.service.recharge.PriceService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Collections; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("priceService") |
||||
public class PriceServiceImpl implements PriceService { |
||||
|
||||
@Resource |
||||
private RechargePriceMapper rechargePriceMapper; |
||||
|
||||
@Override |
||||
public void create(RechargePrice rechargePrice) { |
||||
rechargePriceMapper.insert(rechargePrice); |
||||
} |
||||
|
||||
@Override |
||||
public void update(RechargePrice rechargePrice) { |
||||
rechargePriceMapper.updateByPrimaryKeySelective(rechargePrice); |
||||
} |
||||
|
||||
@Override |
||||
public void delete(Long id, Boolean fullDelete) { |
||||
if (fullDelete) { |
||||
rechargePriceMapper.deleteByPrimaryKey(id); |
||||
} else { |
||||
RechargePrice rechargePrice = queryDetail(id); |
||||
rechargePrice.setStatus(0); |
||||
rechargePrice.setUpdateTime(new Date()); |
||||
update(rechargePrice); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public RechargePrice queryDetail(Long id) { |
||||
return rechargePriceMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public List<RechargePrice> getList(Map<String, Object> map) { |
||||
|
||||
RechargePriceExample example = new RechargePriceExample(); |
||||
RechargePriceExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
if (MapUtils.getInteger(map, "type") != null) { |
||||
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type")); |
||||
} |
||||
|
||||
|
||||
|
||||
return rechargePriceMapper.selectByExample(example); |
||||
} |
||||
} |
@ -0,0 +1,43 @@ |
||||
package com.hfkj.service.recharge.impl; |
||||
|
||||
import com.hfkj.dao.RechargeCodeMapper; |
||||
import com.hfkj.entity.RechargeCode; |
||||
import com.hfkj.service.recharge.RechargeCodeService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service("rechargeCodeService") |
||||
public class RechargeCodeServiceImpl implements RechargeCodeService { |
||||
|
||||
@Resource |
||||
private RechargeCodeMapper rechargeCodeMapper; |
||||
|
||||
@Override |
||||
public void create(RechargeCode rechargeCode) { |
||||
rechargeCodeMapper.insert(rechargeCode); |
||||
} |
||||
|
||||
@Override |
||||
public void update(RechargeCode rechargeCode) { |
||||
rechargeCodeMapper.updateByPrimaryKeySelective(rechargeCode); |
||||
} |
||||
|
||||
@Override |
||||
public void delete(Long id, Boolean fullDelete) { |
||||
rechargeCodeMapper.deleteByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public RechargeCode queryDetail(Long id) { |
||||
return rechargeCodeMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public List<RechargeCode> getList(Map<String, Object> map) { |
||||
return Collections.emptyList(); |
||||
} |
||||
} |
Loading…
Reference in new issue