proj_name stringclasses 131
values | relative_path stringlengths 30 228 | class_name stringlengths 1 68 | func_name stringlengths 1 48 | masked_class stringlengths 78 9.82k | func_body stringlengths 46 9.61k | len_input int64 29 2.01k | len_output int64 14 1.94k | total int64 55 2.05k | relevant_context stringlengths 0 38.4k |
|---|---|---|---|---|---|---|---|---|---|
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreAddressServiceImpl.java | StoreAddressServiceImpl | getStoreAddress | class StoreAddressServiceImpl extends ServiceImpl<StoreAddressMapper, StoreAddress> implements StoreAddressService {
@Override
public IPage<StoreAddress> getStoreAddress(String storeId, PageVO pageVo) {<FILL_FUNCTION_BODY>}
@Override
public StoreAddress addStoreAddress(String storeId, StoreAddress sto... |
//获取当前登录商家账号
LambdaQueryWrapper<StoreAddress> lambdaQueryWrapper = Wrappers.lambdaQuery();
lambdaQueryWrapper.eq(StoreAddress::getStoreId, storeId);
return this.page(PageUtil.initPage(pageVo), lambdaQueryWrapper);
| 240 | 77 | 317 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/aspect/interceptor/SystemLogAspect.java | SaveSystemLogThread | run | class SaveSystemLogThread implements Runnable {
@Autowired
private SystemLogVO systemLogVO;
@Autowired
private SystemLogService systemLogService;
public SaveSystemLogThread(SystemLogVO systemLogVO, SystemLogService systemLogService) {
this.systemLogVO = systemLogVO;
... |
try {
systemLogService.saveLog(systemLogVO);
} catch (Exception e) {
log.error("系统日志保存异常,内容{}:", systemLogVO, e);
}
| 121 | 56 | 177 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/entity/dto/HotWordsSettingItem.java | HotWordsSettingItem | getScore | class HotWordsSettingItem implements Comparable<HotWordsSettingItem>, Serializable {
@ApiModelProperty(value = "热词")
private String keywords;
@ApiModelProperty(value = "默认分数")
private Integer score;
public Integer getScore() {<FILL_FUNCTION_BODY>}
public void setScore(Integer score) {
... |
if (score == null || score < 0) {
return 0;
}
return score;
| 148 | 30 | 178 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/entity/dto/OssSetting.java | OssSetting | getType | class OssSetting implements Serializable {
private static final long serialVersionUID = 2975271656230801861L;
/**
* oss类型
*/
private String type;
/**
* 阿里云-域名
*/
private String aliyunOSSEndPoint = "";
/**
* 阿里云-储存空间
*/
private String aliyunOSSBucketName = "";... |
//默认给阿里云oss存储类型
if (StringUtils.isEmpty(type)) {
return OssEnum.ALI_OSS.name();
}
return type;
| 634 | 50 | 684 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/entity/dto/PointSetting.java | PointSetting | getConsumer | class PointSetting implements Serializable {
private static final long serialVersionUID = -4261856614779031745L;
@ApiModelProperty(value = "注册")
private Integer register;
@ApiModelProperty(value = "消费1元赠送多少积分")
private Integer consumer;
@ApiModelProperty(value = "积分付款X积分=1元")
private Inte... |
if (consumer == null || consumer < 0) {
return 0;
}
return consumer;
| 379 | 31 | 410 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/entity/dto/PointSettingItem.java | PointSettingItem | getPoint | class PointSettingItem implements Comparable<PointSettingItem>, Serializable {
@ApiModelProperty(value = "签到天数")
private Integer day;
@ApiModelProperty(value = "赠送积分")
private Integer point;
public Integer getPoint() {<FILL_FUNCTION_BODY>}
public void setPoint(Integer point) {
this... |
if (point == null || point < 0) {
return 0;
}
return point;
| 147 | 30 | 177 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/entity/dto/payment/dto/PaymentSupportForm.java | PaymentSupportForm | getClients | class PaymentSupportForm {
/**
* 客户端类型列表
*
* @return 客户端类型
*/
public List<ClientTypeEnum> getClients() {<FILL_FUNCTION_BODY>}
/**
* 支付方式列表
*
* @return 即支持的支付方式集合
*/
public List<PaymentMethodEnum> getPayments() {
List<PaymentMethodEnum> keys = new ArrayL... |
List<ClientTypeEnum> keys = new ArrayList<>();
for (ClientTypeEnum clientTypeEnum : ClientTypeEnum.values()) {
if (clientTypeEnum.equals(ClientTypeEnum.UNKNOWN)){
continue;
}
keys.add(clientTypeEnum);
}
return keys;
| 199 | 79 | 278 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/serviceimpl/AppVersionServiceImpl.java | AppVersionServiceImpl | checkAppVersion | class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVersion> implements AppVersionService {
@Override
public AppVersion getAppVersion(String appType) {
return this.baseMapper.getLatestVersion(appType);
}
@Override
public boolean checkAppVersion(AppVersion appVersion) {<FIL... |
if (null == appVersion) {
throw new ServiceException(ResultCode.APP_VERSION_PARAM_ERROR);
}
if (StringUtils.isBlank(appVersion.getType())) {
throw new ServiceException(ResultCode.APP_VERSION_TYPE_ERROR);
}
//检测版本是否存在(同类型APP下版本不允许重复)
if (null != th... | 93 | 200 | 293 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/serviceimpl/LogisticsServiceImpl.java | LogisticsServiceImpl | labelOrder | class LogisticsServiceImpl extends ServiceImpl<LogisticsMapper, Logistics> implements LogisticsService {
@Autowired
private LogisticsPluginFactory logisticsPluginFactory;
@Autowired
private OrderService orderService;
@Autowired
private OrderItemService orderItemService;
@Autowired
privat... |
//获取设置
LogisticsSetting logisticsSetting = this.getLogisticsSetting();
//获取订单及子订单
Order order = OperationalJudgment.judgment(orderService.getBySn(orderSn));
if ((LogisticsEnum.SHUNFENG.name().equals(logisticsSetting.getType()) && order.getDeliverStatus().equals(DeliverStatusEnum... | 544 | 604 | 1,148 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/system/serviceimpl/SensitiveWordsServiceImpl.java | SensitiveWordsServiceImpl | resetCache | class SensitiveWordsServiceImpl extends ServiceImpl<SensitiveWordsMapper, SensitiveWords> implements SensitiveWordsService {
@Autowired
private Cache<List<String>> cache;
@Override
public void resetCache() {<FILL_FUNCTION_BODY>}
} |
List<SensitiveWords> sensitiveWordsList = this.list();
if (sensitiveWordsList == null || sensitiveWordsList.isEmpty()) {
return;
}
List<String> sensitiveWords = sensitiveWordsList.stream().map(SensitiveWords::getSensitiveWord).collect(Collectors.toList());
cache.put... | 74 | 107 | 181 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/verification/ImageUtil.java | ImageUtil | readPixel | class ImageUtil {
/**
* 添加水印
*
* @param oriImage 原图
* @param text 文字
* @throws IOException 流操作异常
*/
public static void addWatermark(BufferedImage oriImage, String text) {
Graphics2D graphics2D = oriImage.createGraphics();
//设置水印文字颜色
graphics2D.setRender... |
int xStart = x - 1;
int yStart = y - 1;
int current = 0;
for (int i = xStart; i < 3 + xStart; i++) {
for (int j = yStart; j < 3 + yStart; j++) {
int tx = i;
if (tx < 0) {
tx = -tx;
} else if (tx >= img.getW... | 1,699 | 192 | 1,891 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/verification/SliderImageUtil.java | SliderImageUtil | pictureTemplatesCut | class SliderImageUtil {
private static final int BOLD = 5;
private static final String IMG_FILE_TYPE = "jpg";
private static final String TEMP_IMG_FILE_TYPE = "png";
/**
* 根据模板切图
*
* @param sliderFile 滑块
* @param originalFile 原图
* @param watermark 水印
* @param inte... |
Random random = new Random();
Map<String, Object> pictureMap = new HashMap<>(16);
//拼图
BufferedImage sliderImage = ImageIO.read(Base64DecodeMultipartFile.base64ToInputStream(sliderFile.getBase64()));
int sliderWidth = sliderImage.getWidth();
int sliderHeight = sliderIma... | 213 | 1,122 | 1,335 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/verification/VerificationSDK.java | VerificationSDK | checked | class VerificationSDK {
@Autowired
private Cache cache;
/**
* 生成一个token 用于获取校验中心的验证码逻辑
*
* @return
*/
public boolean checked(String verificationKey, String uuid) {<FILL_FUNCTION_BODY>}
} |
//生成校验KEY,在验证码服务做记录
String key = CachePrefix.VERIFICATION_KEY.getPrefix() + verificationKey;
cache.get(key);
return true;
| 85 | 53 | 138 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/verification/aop/VerificationInterceptor.java | VerificationInterceptor | interceptor | class VerificationInterceptor {
@Autowired
private VerificationService verificationService;
@Before("@annotation(cn.lili.modules.verification.aop.annotation.Verification)")
public void interceptor(JoinPoint pjp) {<FILL_FUNCTION_BODY>}
} |
MethodSignature signature = (MethodSignature) pjp.getSignature();
Method method = signature.getMethod();
Verification verificationAnnotation = method.getAnnotation(Verification.class);
VerificationEnums verificationEnums = verificationAnnotation.type();
String uuid = verificatio... | 81 | 119 | 200 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/verification/service/impl/VerificationSourceServiceImpl.java | VerificationSourceServiceImpl | initCache | class VerificationSourceServiceImpl extends ServiceImpl<VerificationSourceMapper, VerificationSource> implements VerificationSourceService {
@Autowired
private Cache<VerificationDTO> cache;
@Override
public VerificationDTO initCache() {<FILL_FUNCTION_BODY>}
@Override
public VerificationDTO ge... |
List<VerificationSource> dbList = this.list();
List<VerificationSource> resourceList = new ArrayList<>();
List<VerificationSource> sliderList = new ArrayList<>();
for (VerificationSource item : dbList) {
if (item.getType().equals(VerificationSourceEnum.RESOURCE.name())) {
... | 208 | 206 | 414 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wallet/serviceimpl/MemberWithdrawApplyServiceImpl.java | MemberWithdrawApplyServiceImpl | getMemberWithdrawPage | class MemberWithdrawApplyServiceImpl extends ServiceImpl<MemberWithdrawApplyMapper, MemberWithdrawApply> implements MemberWithdrawApplyService {
@Autowired
private RocketMQTemplate rocketMQTemplate;
@Autowired
private RocketmqCustomProperties rocketmqCustomProperties;
/**
* 会员余额
*/
@... |
//构建查询条件
QueryWrapper<MemberWithdrawApply> queryWrapper = new QueryWrapper<>();
//会员名称
queryWrapper.like(!StringUtils.isEmpty(memberWithdrawApplyQueryVO.getMemberName()), "member_name", memberWithdrawApplyQueryVO.getMemberName());
//充值订单号
queryWrapper.eq(!StringUtils.isE... | 718 | 383 | 1,101 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wallet/serviceimpl/RechargeServiceImpl.java | RechargeServiceImpl | paySuccess | class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> implements RechargeService {
/**
* 会员预存款
*/
@Autowired
private MemberWalletService memberWalletService;
@Override
public Recharge recharge(Double price) {
if (price == null || price <= 0 || price > 1000000) ... |
//根据sn获取支付账单
Recharge recharge = this.getOne(new QueryWrapper<Recharge>().eq("recharge_sn", sn));
//如果支付账单不为空则进行一下逻辑
if (recharge != null && !recharge.getPayStatus().equals(PayStatusEnum.PAID.name())) {
//将此账单支付状态更改为已支付
recharge.setPayStatus(PayStatusEnum.PAID.na... | 807 | 264 | 1,071 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wallet/serviceimpl/WalletLogServiceImpl.java | WalletLogServiceImpl | depositLogPage | class WalletLogServiceImpl extends ServiceImpl<WalletLogMapper, WalletLog> implements WalletLogService {
@Override
public IPage<WalletLog> depositLogPage(PageVO page, DepositQueryVO depositQueryVO) {<FILL_FUNCTION_BODY>}
} |
//构建查询条件
QueryWrapper<WalletLog> depositLogQueryWrapper = new QueryWrapper<>();
//会员名称
depositLogQueryWrapper.like(!CharSequenceUtil.isEmpty(depositQueryVO.getMemberName()), "member_name", depositQueryVO.getMemberName());
//会员id
depositLogQueryWrapper.eq(!CharSequenceUti... | 71 | 272 | 343 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wechat/serviceimpl/WechatMPMessageServiceImpl.java | WechatMPMessageServiceImpl | init | class WechatMPMessageServiceImpl extends ServiceImpl<WechatMPMessageMapper, WechatMPMessage> implements WechatMPMessageService {
@Autowired
private WechatAccessTokenUtil wechatAccessTokenUtil;
/**
* get 获取所有的模版
*/
private final String allMsgTpl = "https://api.weixin.qq.com/wxaapi/newtmpl/gett... |
this.baseMapper.deleteAll();
try {
String accessToken = wechatAccessTokenUtil.cgiAccessToken(ClientTypeEnum.WECHAT_MP);
//获取已有模版,删除
String context = HttpUtil.get(allMsgTpl + accessToken);
log.info("获取全部模版:{}", context);
JSONObject jsonObject ... | 770 | 1,076 | 1,846 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wechat/serviceimpl/WechatMessageServiceImpl.java | WechatMessageServiceImpl | init | class WechatMessageServiceImpl extends ServiceImpl<WechatMessageMapper, WechatMessage> implements WechatMessageService {
@Autowired
private WechatAccessTokenUtil wechatAccessTokenUtil;
/**
* 设置行业
*/
private final String setIndustry = "https://api.weixin.qq.com/cgi-bin/template/api_set_indust... |
try {
this.baseMapper.deleteAll();
//获取token
String accessToken = wechatAccessTokenUtil.cgiAccessToken(ClientTypeEnum.H5);
//设置行业
Map<String, Object> setIndustryParams = new HashMap<>(16);
//互联网/电子商务
setIndustryParams.put("i... | 806 | 848 | 1,654 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wechat/util/WechatAccessTokenUtil.java | WechatAccessTokenUtil | cgiAccessToken | class WechatAccessTokenUtil {
@Autowired
private Cache cache;
@Autowired
private SettingService settingService;
/**
* 获取某一平台等cgi token 用于业务调用,例如发送公众号消息
*
* @param clientTypeEnum h5 公众号 / wechatMP 微信小程序
* @return
*/
public String cgiAccessToken(ClientTypeEnum clientTypeE... |
//h5 和MP 才有获取token的能力
if (clientTypeEnum.equals(ClientTypeEnum.H5) || clientTypeEnum.equals(ClientTypeEnum.WECHAT_MP)) {
//缓存一下token
String token = cache.getString(CachePrefix.WECHAT_CGI_ACCESS_TOKEN.getPrefix() + clientTypeEnum.name());
if (token != null) {
... | 535 | 572 | 1,107 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wechat/util/WechatMessageData.java | WechatMessageData | createData | class WechatMessageData {
/**
* 抬头文字
*/
private String first;
/**
* 备注文字
*/
private String remark;
/**
* 消息内容
*/
private List<String> messageData;
/**
* 小程序消息内容
*/
private Map<String, String> mpMessageData;
/**
* kids
*/
priva... |
Map<String, Map<String, String>> dataMap = new LinkedHashMap<>();
//拼接开头
dataMap.put("first", this.createValue(first));
//拼接关键字
for (int i = 0; i < messageData.size(); i++) {
dataMap.put("keyword" + (i + 1), createValue(this.messageData.get(i)));
}
... | 367 | 137 | 504 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/modules/wechat/util/WechatMpCodeUtil.java | WechatMpCodeUtil | createQrCode | class WechatMpCodeUtil {
private static String UN_LIMIT_API = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
private static String CREATE_QR_CODE = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=";
@Autowired
private WechatAccessTokenUtil wechatAccessTokenUtil... |
try {
String accessToken = wechatAccessTokenUtil.cgiAccessToken(ClientTypeEnum.WECHAT_MP);
Map<String, String> params = new HashMap<>(2);
params.put("path", path);
params.put("width", "280");
//========================================================... | 1,060 | 364 | 1,424 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/heath/DataSourceHealthConfig.java | DataSourceHealthConfig | createIndicator | class DataSourceHealthConfig extends DataSourceHealthContributorAutoConfiguration {
@Value("${spring.datasource.dbcp2.validation-query:select 1}")
private String defaultQuery;
public DataSourceHealthConfig(Map<String, DataSource> dataSources, ObjectProvider<DataSourcePoolMetadataProvider> metadataProvide... |
DataSourceHealthIndicator indicator = (DataSourceHealthIndicator) super.createIndicator(source);
if (!StringUtils.hasText(indicator.getQuery())) {
indicator.setQuery(defaultQuery);
}
return indicator;
| 137 | 65 | 202 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/mybatisplus/MyMetaObjectHandler.java | MyMetaObjectHandler | insertFill | class MyMetaObjectHandler implements MetaObjectHandler {
@Override
public void insertFill(MetaObject metaObject) {<FILL_FUNCTION_BODY>}
@Override
public void updateFill(MetaObject metaObject) {
AuthUser authUser = UserContext.getCurrentUser();
if (authUser != null) {
this.... |
AuthUser authUser = UserContext.getCurrentUser();
if (authUser != null) {
this.setFieldValByName("createBy", authUser.getUsername(), metaObject);
} else {
this.setFieldValByName("createBy", "SYSTEM", metaObject);
}
//有创建时间字段,切字段值为空
if (metaObject... | 136 | 251 | 387 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/mybatisplus/MybatisPlusConfig.java | MybatisPlusConfig | mybatisPlusInterceptor | class MybatisPlusConfig {
/**
* 分页插件,自动识别数据库类型
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {<FILL_FUNCTION_BODY>}
} |
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
//阻断解析器,测试环境使用
// PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
//
// List<ISql... | 65 | 175 | 240 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/mybatisplus/external/SpiceSqlInjector.java | SpiceSqlInjector | getMethodList | class SpiceSqlInjector extends DefaultSqlInjector {
/**
* 如果只需增加方法,保留mybatis plus自带方法,
* 可以先获取super.getMethodList(),再添加add
*/
@Override
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {<FILL_FUNCTION_BODY>}
} |
// 注意:此SQL注入器继承了DefaultSqlInjector(默认注入器),调用了DefaultSqlInjector的getMethodList方法,保留了mybatis-plus的自带方法
List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
// 注入InsertBatchSomeColumn
// 在!t.isLogicDelete()表示不要逻辑删除字段,!"update_time".equals(t.getColumn())表示不要字段名为 up... | 102 | 251 | 353 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/sharding/CreateTimeShardingDatabaseAlgorithm.java | CreateTimeShardingDatabaseAlgorithm | doSharding | class CreateTimeShardingDatabaseAlgorithm implements PreciseShardingAlgorithm<Long>, RangeShardingAlgorithm {
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<Long> preciseShardingValue) {<FILL_FUNCTION_BODY>}
@Override
public Collection<String> doSharding(Collec... |
Long createTime = preciseShardingValue.getValue();
String value = DateUtil.toString(createTime, "yyyy");
//data2019,data2020
return "data" + value;
| 247 | 56 | 303 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/sharding/CreateTimeShardingTableAlgorithm.java | CreateTimeShardingTableAlgorithm | doSharding | class CreateTimeShardingTableAlgorithm implements PreciseShardingAlgorithm<Long>, RangeShardingAlgorithm {
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<Long> preciseShardingValue) {<FILL_FUNCTION_BODY>}
@Override
public Collection<String> doSharding(Collectio... |
Long createTime = preciseShardingValue.getValue();
String monthValue = DateUtil.toString(createTime, "MM");
String yearValue = DateUtil.toString(createTime, "yyyy");
Integer month = Integer.valueOf(monthValue);
Integer year = Integer.valueOf(yearValue);
//li_order_1,li_o... | 624 | 108 | 732 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/sharding/CreateTimeShardingTableAlgorithmBak.java | CreateTimeShardingTableAlgorithmBak | doSharding | class CreateTimeShardingTableAlgorithmBak implements PreciseShardingAlgorithm<Long>, RangeShardingAlgorithm {
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<Long> preciseShardingValue) {<FILL_FUNCTION_BODY>}
@Override
public Collection<String> doSharding(Collec... |
Long createTime = preciseShardingValue.getValue();
String value = DateUtil.toString(createTime, "MM");
Integer month = Integer.valueOf(value);
//li_order_1,li_order_2~
return "li_order_" + month;
| 268 | 71 | 339 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/mybatis/util/PageUtil.java | PageUtil | listToPage | class PageUtil {
//有order by 注入风险,限制长度
static final Integer orderByLengthLimit = 20;
/**
* Mybatis-Plus分页封装
*
* @param page 分页VO
* @param <T> 范型
* @return 分页响应
*/
public static <T> Page<T> initPage(PageVO page) {
int pageNumber = page.getPageNumber();
in... |
int pageNumber = page.getPageNumber() - 1;
int pageSize = page.getPageSize();
if (pageNumber < 0) {
pageNumber = 0;
}
if (pageSize < 1) {
pageSize = 10;
}
if (pageSize > 100) {
pageSize = 100;
}
int fromIndex... | 1,234 | 197 | 1,431 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/trigger/delay/AbstractDelayQueueMachineFactory.java | AbstractDelayQueueMachineFactory | addJob | class AbstractDelayQueueMachineFactory {
@Autowired
private Cache cache;
/**
* 插入任务id
*
* @param jobId 任务id(队列内唯一)
* @param triggerTime 执行时间 时间戳(毫秒)
* @return 是否插入成功
*/
public boolean addJob(String jobId, Long triggerTime) {<FILL_FUNCTION_BODY>}
/**
* 要实现... |
//redis 中排序时间
long delaySeconds = triggerTime / 1000;
//增加延时任务 参数依次为:队列名称、执行时间、任务id
boolean result = cache.zAdd(setDelayQueueName(), delaySeconds, jobId);
log.info("增加延时任务, 缓存key {}, 执行时间 {},任务id {}", setDelayQueueName(), DateUtil.toString(triggerTime), jobId);
return r... | 159 | 122 | 281 | <no_super_class> |
lilishop_lilishop | lilishop/framework/src/main/java/cn/lili/trigger/interfaces/impl/RocketmqTimerTrigger.java | RocketmqTimerTrigger | addDelay | class RocketmqTimerTrigger implements TimeTrigger {
@Autowired
private RocketMQTemplate rocketMQTemplate;
@Autowired
private Cache<Integer> cache;
@Autowired
private PromotionDelayQueue promotionDelayQueue;
@Override
public void addDelay(TimeTriggerMsg timeTriggerMsg) {<FILL_FUNCTION_B... |
//执行器唯一key
String uniqueKey = timeTriggerMsg.getUniqueKey();
if (StringUtils.isEmpty(uniqueKey)) {
uniqueKey = StringUtils.getRandStr(10);
}
//执行任务key
String generateKey = DelayQueueTools.generateKey(timeTriggerMsg.getTriggerExecutor(), timeTriggerMsg.getTrig... | 720 | 273 | 993 | <no_super_class> |
lilishop_lilishop | lilishop/im-api/src/main/java/cn/lili/controller/im/ImMessageController.java | ImMessageController | save | class ImMessageController {
private final ImMessageService imMessageService;
@GetMapping(value = "/{id}")
@ApiOperation(value = "查看Im消息详情")
public ResultMessage<ImMessage> get(@PathVariable String id) {
ImMessage imMessage = imMessageService.getById(id);
return ResultUtil.data(imMessag... |
if (imMessageService.save(imMessage)) {
return ResultUtil.data(imMessage);
}
throw new ServiceException(ResultCode.IM_MESSAGE_ADD_ERROR);
| 588 | 51 | 639 | <no_super_class> |
lilishop_lilishop | lilishop/im-api/src/main/java/cn/lili/controller/im/WebSocketServer.java | WebSocketServer | operation | class WebSocketServer {
/**
* 消息服务
*/
private final ImMessageService imMessageService;
private final ImTalkService imTalkService;
/**
* 在线人数
* PS 注意,只能单节点,如果多节点部署需要自行寻找方案
*/
private static ConcurrentHashMap<String, Session> sessionPools = new ConcurrentHashMap<>();
/... |
AuthUser authUser = UserContext.getAuthUser(accessToken);
switch (messageOperation.getOperationType()) {
case PING:
break;
case MESSAGE:
//保存消息
ImMessage imMessage = new ImMessage(messageOperation);
imMessageServic... | 868 | 372 | 1,240 | <no_super_class> |
lilishop_lilishop | lilishop/im-api/src/main/java/cn/lili/controller/security/ImSecurityConfig.java | ImSecurityConfig | configure | class ImSecurityConfig extends WebSecurityConfigurerAdapter {
/**
* spring security -》 权限不足处理
*/
@Autowired
private CorsConfigurationSource corsConfigurationSource;
@Override
protected void configure(HttpSecurity http) throws Exception {<FILL_FUNCTION_BODY>}
} |
ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry = http
.authorizeRequests();
registry
.and()
//禁止网页iframe
.headers().frameOptions().disable()
.and()
.authorizeRequ... | 84 | 143 | 227 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/distribution/DistributionManagerController.java | DistributionManagerController | retreat | class DistributionManagerController {
@Autowired
private DistributionService distributionService;
@ApiOperation(value = "分页获取")
@GetMapping(value = "/getByPage")
public ResultMessage<IPage<Distribution>> getByPage(DistributionSearchParams distributionSearchParams, PageVO page) {
return Res... |
if (distributionService.retreat(id)) {
return ResultUtil.success();
} else {
throw new ServiceException(ResultCode.DISTRIBUTION_RETREAT_ERROR);
}
| 595 | 56 | 651 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/goods/CategoryManagerController.java | CategoryManagerController | disable | class CategoryManagerController {
/**
* 分类
*/
@Autowired
private CategoryService categoryService;
/**
* 商品
*/
@Autowired
private GoodsService goodsService;
@ApiOperation(value = "查询某分类下的全部子分类列表")
@ApiImplicitParam(name = "parentId", value = "父id,顶级为0", required = t... |
Category category = categoryService.getById(id);
if (category == null) {
throw new ServiceException(ResultCode.CATEGORY_NOT_EXIST);
}
categoryService.updateCategoryStatus(id, enableOperations);
return ResultUtil.success();
| 969 | 72 | 1,041 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/goods/CategoryParameterGroupManagerController.java | CategoryParameterGroupManagerController | saveOrUpdate | class CategoryParameterGroupManagerController {
/**
* 参数组
*/
@Autowired
private ParametersService parametersService;
/**
* 分类参数
*/
@Autowired
private CategoryParameterGroupService categoryParameterGroupService;
@ApiOperation(value = "查询某分类下绑定的参数信息")
@GetMapping(val... |
if (categoryParameterGroupService.save(categoryParameterGroup)) {
return ResultUtil.data(categoryParameterGroup);
}
throw new ServiceException(ResultCode.CATEGORY_PARAMETER_SAVE_ERROR);
| 478 | 59 | 537 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/goods/CategorySpecificationManagerController.java | CategorySpecificationManagerController | saveCategoryBrand | class CategorySpecificationManagerController {
/**
* 分类规格
*/
@Autowired
private CategorySpecificationService categorySpecificationService;
/**
* 规格
*/
@Autowired
private SpecificationService specificationService;
@ApiOperation(value = "查询某分类下绑定的规格信息")
@GetMapping(... |
//删除分类规格绑定信息
this.categorySpecificationService.remove(new QueryWrapper<CategorySpecification>().eq("category_id", categoryId));
//绑定规格信息
if (categorySpecs != null && categorySpecs.length > 0) {
List<CategorySpecification> categorySpecifications = new ArrayList<>();
... | 458 | 149 | 607 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/goods/GoodsManagerController.java | GoodsManagerController | auth | class GoodsManagerController {
/**
* 商品
*/
@Autowired
private GoodsService goodsService;
/**
* 规格商品
*/
@Autowired
private GoodsSkuService goodsSkuService;
@ApiOperation(value = "分页获取")
@GetMapping(value = "/list")
public ResultMessage<IPage<Goods>> getByPage(Good... |
//校验商品是否存在
if (goodsService.auditGoods(goodsIds, GoodsAuthEnum.valueOf(authFlag))) {
return ResultUtil.success();
}
throw new ServiceException(ResultCode.GOODS_AUTH_ERROR);
| 1,055 | 70 | 1,125 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/goods/ParameterManagerController.java | ParameterManagerController | save | class ParameterManagerController {
@Autowired
private ParametersService parametersService;
@ApiOperation(value = "添加参数")
@PostMapping
public ResultMessage<Parameters> save(@Valid Parameters parameters) {<FILL_FUNCTION_BODY>}
@ApiOperation(value = "编辑参数")
@PutMapping
public ResultMess... |
if (parametersService.save(parameters)) {
return ResultUtil.data(parameters);
}
throw new ServiceException(ResultCode.PARAMETER_SAVE_ERROR);
| 252 | 49 | 301 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/goods/SpecificationManagerController.java | SpecificationManagerController | page | class SpecificationManagerController {
@Autowired
private SpecificationService specificationService;
@GetMapping("/all")
@ApiOperation(value = "获取所有可用规格")
public ResultMessage<List<Specification>> getAll() {
return ResultUtil.data(specificationService.list());
}
@GetMapping
@... |
LambdaQueryWrapper<Specification> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.like(CharSequenceUtil.isNotEmpty(specName), Specification::getSpecName, specName);
return ResultUtil.data(specificationService.page(PageUtil.initPage(page), lambdaQueryWrapper));
| 382 | 82 | 464 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/member/MemberGradeManagerController.java | MemberGradeManagerController | daa | class MemberGradeManagerController {
@Autowired
private MemberGradeService memberGradeService;
@ApiOperation(value = "通过id获取会员等级")
@ApiImplicitParam(name = "id", value = "会员等级ID", required = true, dataType = "String", paramType = "path")
@GetMapping(value = "/get/{id}")
public ResultMessage<Me... |
if (memberGradeService.save(memberGrade)) {
return ResultUtil.success(ResultCode.SUCCESS);
}
throw new ServiceException(ResultCode.ERROR);
| 639 | 49 | 688 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/message/MemberNoticeManagerController.java | MemberNoticeManagerController | readAll | class MemberNoticeManagerController {
@Autowired
private MemberNoticeService memberNoticeService;
@ApiOperation(value = "获取详情")
@GetMapping(value = "/{id}")
public ResultMessage<MemberNotice> get(@PathVariable String id) {
MemberNotice memberNotice = memberNoticeService.getById(id);
... |
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.in("member_id", UserContext.getCurrentUser().getId());
updateWrapper.set("is_read", true);
memberNoticeService.update(updateWrapper);
return ResultUtil.success();
| 490 | 66 | 556 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/order/OrderComplaintManagerController.java | OrderComplaintManagerController | addCommunication | class OrderComplaintManagerController {
/**
* 交易投诉
*/
@Autowired
private OrderComplaintService orderComplaintService;
/**
* 交易投诉沟通
*/
@Autowired
private OrderComplaintCommunicationService orderComplaintCommunicationService;
@ApiOperation(value = "通过id获取")
@ApiImpli... |
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
OrderComplaintCommunicationVO communicationVO = new OrderComplaintCommunicationVO(complainId, content, CommunicationOwnerEnum.PLATFORM.name(), currentUser.getUsername(), currentUser.getId());
orderComplaintCommunicatio... | 842 | 108 | 950 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/order/OrderManagerController.java | OrderManagerController | updateOrderPrice | class OrderManagerController {
/**
* 订单
*/
@Autowired
private OrderService orderService;
/**
* 订单价格
*/
@Autowired
private OrderPriceService orderPriceService;
@ApiOperation(value = "查询订单列表分页")
@GetMapping
public ResultMessage<IPage<OrderSimpleVO>> queryMineOrde... |
if (NumberUtil.isGreater(Convert.toBigDecimal(price), Convert.toBigDecimal(0))) {
return ResultUtil.data(orderPriceService.updatePrice(orderSn, price));
} else {
return ResultUtil.error(ResultCode.ORDER_PRICE_ERROR);
}
| 1,075 | 79 | 1,154 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/other/AppVersionManagerController.java | AppVersionManagerController | add | class AppVersionManagerController {
@Autowired
private AppVersionService appVersionService;
@ApiOperation(value = "查询app升级消息", response = AppVersion.class)
@GetMapping
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "APP类型", required = true, dataType = "type", paramType =... |
if(this.appVersionService.checkAppVersion(appVersion)){
if(this.appVersionService.save(appVersion)){
return ResultUtil.success();
}
}
throw new ServiceException(ResultCode.ERROR);
| 548 | 62 | 610 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/other/ArticleCategoryManagerController.java | ArticleCategoryManagerController | update | class ArticleCategoryManagerController {
/**
* 文章分类
*/
@Autowired
private ArticleCategoryService articleCategoryService;
@ApiOperation(value = "查询分类列表")
@GetMapping(value = "/all-children")
public ResultMessage<List<ArticleCategoryVO>> allChildren() {
try {
return... |
if (articleCategory.getLevel() == null) {
articleCategory.setLevel(0);
}
if (articleCategory.getSort() == null) {
articleCategory.setSort(0);
}
articleCategory.setId(id);
return ResultUtil.data(articleCategoryService.updateArticleCategory(articl... | 567 | 89 | 656 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/other/CustomWordsController.java | CustomWordsController | getCustomWords | class CustomWordsController {
/**
* 分词
*/
@Autowired
private CustomWordsService customWordsService;
/**
* 设置
*/
@Autowired
private SettingService settingService;
@GetMapping
public String getCustomWords(String secretKey) {<FILL_FUNCTION_BODY>}
@ApiOperation(val... |
if (CharSequenceUtil.isEmpty(secretKey)) {
return "";
}
Setting setting = settingService.get(SettingKeys.ES_SIGN.name());
if (setting == null || CharSequenceUtil.isEmpty(setting.getSettingValue())) {
return "";
}
JSONObject jsonObject = JSONUtil.... | 487 | 197 | 684 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/other/broadcast/StudioManagerController.java | StudioManagerController | recommend | class StudioManagerController {
@Autowired
private StudioService studioService;
@ApiOperation(value = "获取店铺直播间列表")
@ApiImplicitParam(name = "status", value = "直播间状态", paramType = "query")
@GetMapping
public ResultMessage<IPage<StudioVO>> page(PageVO pageVO, String status) {
return Resu... |
if (studioService.update(new UpdateWrapper<Studio>()
.eq("id", id)
.set("recommend", recommend))) {
return ResultUtil.success();
}
throw new ServiceException(ResultCode.ERROR);
| 359 | 65 | 424 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/passport/AdminUserManagerController.java | AdminUserManagerController | login | class AdminUserManagerController {
@Autowired
private AdminUserService adminUserService;
/**
* 会员
*/
@Autowired
private MemberService memberService;
@Autowired
private VerificationService verificationService;
@PostMapping(value = "/login")
@ApiOperation(value = "登录管理员")
... |
if (verificationService.check(uuid, VerificationEnums.LOGIN)) {
return ResultUtil.data(adminUserService.login(username, password));
} else {
throw new ServiceException(ResultCode.VERIFICATION_ERROR);
}
| 1,609 | 66 | 1,675 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/permission/MenuManagerController.java | MenuManagerController | add | class MenuManagerController {
@Autowired
private MenuService menuService;
@ApiOperation(value = "搜索菜单")
@GetMapping
public ResultMessage<List<Menu>> searchPermissionList(MenuSearchParams searchParams) {
return ResultUtil.data(menuService.searchList(searchParams));
}
@ApiOperation(... |
try {
menuService.saveOrUpdateMenu(menu);
} catch (Exception e) {
log.error("添加菜单错误", e);
}
return ResultUtil.data(menu);
| 447 | 54 | 501 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/permission/StoreMenuManagerController.java | StoreMenuManagerController | add | class StoreMenuManagerController {
@Autowired
private StoreMenuService storeMenuService;
@ApiOperation(value = "搜索菜单")
@GetMapping
public ResultMessage<List<StoreMenu>> searchPermissionList(MenuSearchParams searchParams) {
return ResultUtil.data(storeMenuService.searchList(searchParams));
... |
try {
storeMenuService.saveOrUpdateMenu(menu);
} catch (Exception e) {
log.error("添加菜单错误", e);
}
return ResultUtil.data(menu);
| 399 | 55 | 454 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/promotion/CouponActivityManagerController.java | CouponActivityManagerController | addCouponActivity | class CouponActivityManagerController {
@Autowired
private CouponActivityService couponActivityService;
@ApiOperation(value = "获取优惠券活动分页")
@GetMapping
public ResultMessage<IPage<CouponActivity>> getCouponActivityPage(PageVO page, CouponActivity couponActivity) {
return ResultUtil.data(coup... |
for (CouponActivityItem couponActivityItem : couponActivityDTO.getCouponActivityItems()) {
if (couponActivityItem.getNum() > 5) {
throw new ServiceException(ResultCode.COUPON_ACTIVITY_MAX_NUM);
}
}
if (couponActivityService.savePromotions(couponActivityDT... | 451 | 135 | 586 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/promotion/CouponManagerController.java | CouponManagerController | getByPage | class CouponManagerController {
@Autowired
private CouponService couponService;
@Autowired
private MemberCouponService memberCouponService;
@ApiOperation(value = "获取优惠券列表")
@GetMapping
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
... |
QueryWrapper<MemberCoupon> queryWrapper = new QueryWrapper<>();
IPage<MemberCoupon> data = memberCouponService.page(PageUtil.initPage(page),
queryWrapper.eq("coupon_id", id)
);
return ResultUtil.data(data);
| 1,090 | 77 | 1,167 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/promotion/FullDiscountManagerController.java | FullDiscountManagerController | updateCouponStatus | class FullDiscountManagerController {
@Autowired
private FullDiscountService fullDiscountService;
@ApiOperation(value = "获取满优惠列表")
@GetMapping
public ResultMessage<IPage<FullDiscount>> getCouponList(FullDiscountSearchParams searchParams, PageVO page) {
return ResultUtil.data(fullDiscountSe... |
if (fullDiscountService.updateStatus(Collections.singletonList(id), startTime, endTime)) {
return ResultUtil.success(ResultCode.SUCCESS);
}
return ResultUtil.error(ResultCode.ERROR);
| 322 | 61 | 383 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/promotion/KanJiaActivityGoodsManagerController.java | KanJiaActivityGoodsManagerController | delete | class KanJiaActivityGoodsManagerController {
@Autowired
private KanjiaActivityGoodsService kanJiaActivityGoodsService;
@PostMapping
@ApiOperation(value = "添加砍价活动")
public ResultMessage<Object> add(@RequestBody KanjiaActivityGoodsOperationDTO kanJiaActivityGoodsOperationDTO) {
kanJiaActivit... |
if (kanJiaActivityGoodsService.removePromotions(Arrays.asList(ids.split(",")))) {
return ResultUtil.success();
}
throw new ServiceException(ResultCode.KANJIA_GOODS_DELETE_ERROR);
| 529 | 69 | 598 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/promotion/PintuanManagerController.java | PintuanManagerController | openPintuan | class PintuanManagerController {
@Autowired
private PintuanService pintuanService;
@Autowired
private PromotionGoodsService promotionGoodsService;
@GetMapping(value = "/{id}")
@ApiOperation(value = "通过id获取")
public ResultMessage<PintuanVO> get(@PathVariable String id) {
PintuanVO pi... |
if (pintuanService.updateStatus(Arrays.asList(pintuanIds.split(",")), startTime, endTime)) {
return ResultUtil.success(ResultCode.PINTUAN_MANUAL_OPEN_SUCCESS);
}
throw new ServiceException(ResultCode.PINTUAN_MANUAL_OPEN_ERROR);
| 467 | 93 | 560 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/promotion/PointsGoodsManagerController.java | PointsGoodsManagerController | delete | class PointsGoodsManagerController {
@Autowired
private PointsGoodsService pointsGoodsService;
@PostMapping(consumes = "application/json", produces = "application/json")
@ApiOperation(value = "添加积分商品")
public ResultMessage<Object> addPointsGoods(@RequestBody List<PointsGoods> pointsGoodsList) {
... |
if (pointsGoodsService.removePromotions(Arrays.asList(ids.split(",")))) {
return ResultUtil.success();
}
throw new ServiceException(ResultCode.POINT_GOODS_ERROR);
| 620 | 61 | 681 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/promotion/PromotionManagerController.java | PromotionManagerController | getPromotionGoods | class PromotionManagerController {
@Autowired
private PromotionService promotionService;
@Autowired
private PromotionGoodsService promotionGoodsService;
@GetMapping("/current")
@ApiOperation(value = "获取当前进行中的促销活动")
public ResultMessage<Map<String, List<PromotionGoods>>> getCurrentPromotion... |
PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams();
searchParams.setPromotionId(promotionId);
searchParams.setPromotionType(promotionType);
searchParams.setPromotionStatus(PromotionsStatusEnum.START.name());
IPage<PromotionGoods> promotionGoods = promotio... | 216 | 112 | 328 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/setting/LogManagerController.java | LogManagerController | getAllByPage | class LogManagerController {
@Autowired
private SystemLogService systemLogService;
@GetMapping(value = "/getAllByPage")
@ApiOperation(value = "分页获取全部")
public ResultMessage<Object> getAllByPage(@RequestParam(required = false) Integer type,
@RequestParam... |
try {
return ResultUtil.data(systemLogService.queryLog(null, operatorName, searchKey, searchVo, pageVo));
} catch (Exception e) {
log.error("日志获取错误",e);
}
return null;
| 248 | 68 | 316 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/setting/NoticeMessageManagerController.java | NoticeMessageManagerController | get | class NoticeMessageManagerController {
@Autowired
private NoticeMessageService noticeMessageService;
@ApiOperation(value = "消息模板分页")
@GetMapping
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "消息类型", dataType = "String", paramType = "query",
allowableV... |
//根据id获取当前消息模板
NoticeMessage noticeMessage = noticeMessageService.getById(id);
if (noticeMessage != null) {
NoticeMessageDetailDTO noticeMessageDetailDTO = new NoticeMessageDetailDTO();
BeanUtil.copyProperties(noticeMessage, noticeMessageDetailDTO);
//组织消息变量
... | 852 | 267 | 1,119 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/statistics/IndexStatisticsManagerController.java | IndexStatisticsManagerController | index | class IndexStatisticsManagerController {
/**
* 首页统计
*/
@Autowired
private IndexStatisticsService indexStatisticsService;
@ApiOperation(value = "获取首页查询数据")
@GetMapping
@PreventDuplicateSubmissions
public ResultMessage<IndexStatisticsVO> index() {<FILL_FUNCTION_BODY>}
@ApiOper... |
try {
return ResultUtil.data(indexStatisticsService.indexStatistics());
} catch (Exception e) {
log.error("获取首页查询数据错误",e);
}
return null;
| 362 | 57 | 419 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/statistics/OrderStatisticsManagerController.java | OrderStatisticsManagerController | order | class OrderStatisticsManagerController {
@Autowired
private OrderStatisticsService orderStatisticsService;
@Autowired
private AfterSaleStatisticsService afterSaleStatisticsService;
@ApiOperation(value = "订单概览统计")
@GetMapping("/overview")
public ResultMessage<OrderOverviewVO> overview(Statis... |
try {
return ResultUtil.data(orderStatisticsService.getStatistics(statisticsQueryParam, pageVO));
} catch (Exception e) {
log.error("订单统计",e);
}
return null;
| 408 | 61 | 469 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/store/StoreManagerController.java | StoreManagerController | getByMemberId | class StoreManagerController {
/**
* 店铺
*/
@Autowired
private StoreService storeService;
/**
* 店铺详情
*/
@Autowired
private StoreDetailService storeDetailService;
@ApiOperation(value = "获取店铺分页列表")
@GetMapping("/all")
public ResultMessage<List<Store>> getAll() {
... |
List<Store> list = storeService.list(new QueryWrapper<Store>().eq("member_id", memberId));
if (list.size() > 0) {
return ResultUtil.data(list.get(0));
}
return ResultUtil.data(null);
| 1,185 | 71 | 1,256 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/wallet/MemberWithdrawApplyManagerController.java | MemberWithdrawApplyManagerController | getByPage | class MemberWithdrawApplyManagerController {
@Autowired
private MemberWithdrawApplyService memberWithdrawApplyService;
@ApiOperation(value = "分页获取提现记录")
@GetMapping
public ResultMessage<IPage<MemberWithdrawApply>> getByPage(PageVO page, MemberWithdrawApplyQueryVO memberWithdrawApplyQueryVO) {<FILL... |
//构建查询 返回数据
IPage<MemberWithdrawApply> memberWithdrawApplyPage = memberWithdrawApplyService.getMemberWithdrawPage(page, memberWithdrawApplyQueryVO);
return ResultUtil.data(memberWithdrawApplyPage);
| 279 | 64 | 343 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/wallet/RechargeManagerController.java | RechargeManagerController | getByPage | class RechargeManagerController {
@Autowired
private RechargeService rechargeService;
@ApiOperation(value = "分页获取预存款充值记录")
@GetMapping
public ResultMessage<IPage<Recharge>> getByPage(PageVO page, RechargeQueryVO rechargeQueryVO) {<FILL_FUNCTION_BODY>}
} |
//构建查询 返回数据
IPage<Recharge> rechargePage = rechargeService.rechargePage(page, rechargeQueryVO);
return ResultUtil.data(rechargePage);
| 93 | 52 | 145 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/controller/wallet/WalletLogManagerController.java | WalletLogManagerController | getByPage | class WalletLogManagerController {
@Autowired
private WalletLogService walletLogService;
@ApiOperation(value = "分页获取预存款充值记录")
@GetMapping
public ResultMessage<IPage<WalletLog>> getByPage(PageVO page, DepositQueryVO depositQueryVO) {<FILL_FUNCTION_BODY>}
} |
//构建查询 返回数据
IPage<WalletLog> depositLogPage = walletLogService.depositLogPage(page, depositQueryVO);
return ResultUtil.data(depositLogPage);
| 94 | 55 | 149 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/security/ManagerAuthenticationFilter.java | ManagerAuthenticationFilter | doFilterInternal | class ManagerAuthenticationFilter extends BasicAuthenticationFilter {
private final Cache cache;
public final MenuService menuService;
private final ManagerTokenGenerate managerTokenGenerate;
public ManagerAuthenticationFilter(AuthenticationManager authenticationManager,
... |
//从header中获取jwt
String jwt = request.getHeader(SecurityEnum.HEADER_TOKEN.getValue());
//如果没有token 则return
if (StrUtil.isBlank(jwt)) {
chain.doFilter(request, response);
return;
}
//获取用户信息,存入context
UsernamePasswordAuthenticationToken aut... | 1,290 | 167 | 1,457 | <no_super_class> |
lilishop_lilishop | lilishop/manager-api/src/main/java/cn/lili/security/ManagerSecurityConfig.java | ManagerSecurityConfig | configure | class ManagerSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
public MenuService menuService;
/**
* 忽略验权配置
*/
@Autowired
private IgnoredUrlsProperties ignoredUrlsProperties;
/**
* spring security -》 权限不足处理
*/
@Autowired
private CustomAccessDeniedHand... |
ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry = http
.authorizeRequests();
//配置的url 不需要授权
for (String url : ignoredUrlsProperties.getUrls()) {
registry.antMatchers(url).permitAll();
}
registry
... | 184 | 296 | 480 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/distribution/DistributionGoodsStoreController.java | DistributionGoodsStoreController | cancel | class DistributionGoodsStoreController {
/**
* 分销商品
*/
@Autowired
private DistributionGoodsService distributionGoodsService;
/**
* 已选择分销商品
*/
@Autowired
private DistributionSelectedGoodsService distributionSelectedGoodsService;
@ApiOperation(value = "获取分销商商品列表")
@G... |
OperationalJudgment.judgment(distributionGoodsService.getById(id));
//清除分销商已选择分销商品
distributionSelectedGoodsService.remove(new QueryWrapper<DistributionSelectedGoods>().eq("distribution_goods_id", id));
//清除分销商品
distributionGoodsService.removeById(id);
return ResultUtil.... | 437 | 99 | 536 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/distribution/DistributionOrderStoreController.java | DistributionOrderStoreController | distributionOrder | class DistributionOrderStoreController {
/**
* 分销订单
*/
@Autowired
private DistributionOrderService distributionOrderService;
@ApiOperation(value = "获取分销订单列表")
@GetMapping
public ResultMessage<IPage<DistributionOrder>> distributionOrder(DistributionOrderSearchParams distributionOrderS... |
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
//获取当前登录商家账号-查询当前店铺的分销订单
distributionOrderSearchParams.setStoreId(storeId);
//查询分销订单列表
IPage<DistributionOrder> distributionOrderPage = distributionOrderService.getDistributionOrderPage(distribut... | 105 | 114 | 219 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/goods/CategoryStoreController.java | CategoryStoreController | getListAll | class CategoryStoreController {
/**
* 分类
*/
@Autowired
private CategoryService categoryService;
/**
* 分类品牌
*/
@Autowired
private CategoryBrandService categoryBrandService;
/**
* 店铺详情
*/
@Autowired
private StoreDetailService storeDetailService;
@Api... |
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
//获取店铺经营范围
String goodsManagementCategory = storeDetailService.getStoreDetail(storeId).getGoodsManagementCategory();
return ResultUtil.data(this.categoryService.getStoreCategory(goodsManagementCategory.s... | 271 | 85 | 356 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/member/StoreUserController.java | StoreUserController | getStoreInfo | class StoreUserController {
@Autowired
private MemberService memberService;
@Autowired
private StoreService storeService;
@GetMapping(value = "/info")
@ApiOperation(value = "获取当前登录用户接口")
public ResultMessage<Member> getUserInfo() {
AuthUser tokenUser = UserContext.getCurrentUser()... |
AuthUser tokenUser = UserContext.getCurrentUser();
if (tokenUser != null) {
Store store = storeService.getById(tokenUser.getStoreId());
return ResultUtil.data(store);
}
throw new ServiceException(ResultCode.USER_NOT_LOGIN);
| 223 | 76 | 299 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/message/StoreMessageController.java | StoreMessageController | getPage | class StoreMessageController {
/**
* 商家消息
*/
@Autowired
private StoreMessageService storeMessageService;
@ApiOperation(value = "获取商家消息")
@ApiImplicitParam(name = "status", value = "状态", required = true, paramType = "query")
@GetMapping
public ResultMessage<IPage<StoreMessage>> ge... |
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
//返回值定义
Map<String, Object> map = new HashMap<>(4);
StoreMessageQueryVO storeMessageQueryVO = new StoreMessageQueryVO();
storeMessageQueryVO.setStoreId(storeId);
//未读消息
storeMessa... | 815 | 289 | 1,104 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/order/OrderComplaintStoreController.java | OrderComplaintStoreController | addCommunication | class OrderComplaintStoreController {
/**
* 交易投诉
*/
@Autowired
private OrderComplaintService orderComplaintService;
/**
* 投诉沟通
*/
@Autowired
private OrderComplaintCommunicationService orderComplaintCommunicationService;
@ApiOperation(value = "通过id获取")
@ApiImplicitP... |
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
OrderComplaintCommunicationVO communicationVO = new OrderComplaintCommunicationVO(complainId, content, CommunicationOwnerEnum.STORE.name(), currentUser.getUsername(), currentUser.getStoreId());
orderComplaintCommunicat... | 775 | 106 | 881 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/other/broadcast/CommodityStoreController.java | CommodityStoreController | delete | class CommodityStoreController {
@Autowired
private CommodityService commodityService;
@ApiOperation(value = "获取店铺直播商品列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "商品名称", dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "auditStatus", va... |
if (commodityService.deleteCommodity(goodsId)) {
return ResultUtil.success(ResultCode.SUCCESS);
}
throw new ServiceException(ResultCode.ERROR);
| 422 | 52 | 474 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/other/broadcast/StudioStoreController.java | StudioStoreController | edit | class StudioStoreController {
@Autowired
private StudioService studioService;
@ApiOperation(value = "获取店铺直播间列表")
@ApiImplicitParam(name = "status", value = "直播间状态", paramType = "query", dataType = "String")
@GetMapping
public ResultMessage<IPage<StudioVO>> page(PageVO pageVO, String status) {
... |
OperationalJudgment.judgment(studioService.getById(studio.getId()));
if (Boolean.TRUE.equals(studioService.edit(studio))) {
return ResultUtil.success(ResultCode.SUCCESS);
}
throw new ServiceException(ResultCode.ERROR);
| 886 | 78 | 964 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/permission/ClerkStoreController.java | ClerkStoreController | add | class ClerkStoreController {
@Autowired
private ClerkService clerkService;
@Autowired
private MemberService memberService;
@GetMapping
@ApiOperation(value = "分页获取店员列表")
public ResultMessage<IPage<ClerkVO>> page(ClerkQueryDTO clerkQueryDTO,
Pag... |
int rolesMaxSize = 10;
try {
if (clerkAddDTO.getRoles() != null && clerkAddDTO.getRoles().size() >= rolesMaxSize) {
throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN);
}
//校验是否已经是会员
Member member = memberService.findByMobile(cler... | 719 | 515 | 1,234 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/promotion/CouponStoreController.java | CouponStoreController | updateCouponStatus | class CouponStoreController {
@Autowired
private CouponService couponService;
@Autowired
private MemberCouponService memberCouponService;
@GetMapping
@ApiOperation(value = "获取优惠券列表")
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
... |
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
String[] split = couponIds.split(",");
List<String> couponIdList = couponService.list(new LambdaQueryWrapper<Coupon>().in(Coupon::getId, Arrays.asList(split)).eq(Coupon::getStoreId, currentUser.getStoreId())).stream().... | 1,058 | 184 | 1,242 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/promotion/PintuanStoreController.java | PintuanStoreController | addPintuan | class PintuanStoreController {
@Autowired
private PintuanService pintuanService;
@Autowired
private PromotionGoodsService promotionGoodsService;
@GetMapping
@ApiOperation(value = "根据条件分页查询拼团活动列表")
public ResultMessage<IPage<Pintuan>> getPintuanByPage(PintuanSearchParams queryParam, PageVO... |
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
pintuan.setStoreId(currentUser.getStoreId());
pintuan.setStoreName(currentUser.getStoreName());
if (pintuanService.savePromotions(pintuan)) {
return ResultUtil.success(ResultCode.PINTUAN_ADD_SUCCESS... | 1,193 | 119 | 1,312 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/promotion/SeckillStoreController.java | SeckillStoreController | addSeckillApply | class SeckillStoreController {
@Autowired
private SeckillService seckillService;
@Autowired
private SeckillApplyService seckillApplyService;
@GetMapping
@ApiOperation(value = "获取秒杀活动列表")
public ResultMessage<IPage<Seckill>> getSeckillPage(SeckillSearchParams queryParam, PageVO pageVo) {
... |
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
seckillApplyService.addSeckillApply(seckillId, storeId, applyVos);
return ResultUtil.success();
| 706 | 61 | 767 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/settings/PageDataStoreController.java | PageDataStoreController | getPageData | class PageDataStoreController {
@Autowired
private PageDataService pageDataService;
@ApiOperation(value = "页面列表")
@ApiImplicitParam(name = "pageClientType", value = "客户端类型", required = true, dataType = "String", paramType = "path")
@GetMapping("/{pageClientType}/pageDataList")
public ResultMes... |
//查询当前店铺下的页面数据
PageData pageData = pageDataService.getOne(
new LambdaQueryWrapper<PageData>()
.eq(PageData::getPageType, PageEnum.STORE.name())
.eq(PageData::getNum, UserContext.getCurrentUser().getStoreId())
.eq(Pa... | 1,041 | 107 | 1,148 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/settings/StoreAddressController.java | StoreAddressController | edit | class StoreAddressController {
/**
* 店铺自提点
*/
@Autowired
private StoreAddressService storeAddressService;
@ApiOperation(value = "获取商家自提点分页")
@GetMapping
public ResultMessage<IPage<StoreAddress>> get(PageVO pageVo) {
String storeId = Objects.requireNonNull(UserContext.getCurre... |
OperationalJudgment.judgment(storeAddressService.getById(id));
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
storeAddress.setId(id);
storeAddress.setStoreId(storeId);
storeAddressService.updateById(storeAddress);
return ResultUtil.da... | 556 | 94 | 650 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/controller/statistics/RefundOrderStatisticsStoreController.java | RefundOrderStatisticsStoreController | getPrice | class RefundOrderStatisticsStoreController {
@Autowired
private RefundOrderStatisticsService refundOrderStatisticsService;
@ApiOperation(value = "获取退款统计列表")
@GetMapping("/getByPage")
public ResultMessage<IPage<RefundOrderStatisticsDataVO>> getByPage(PageVO pageVO, StatisticsQueryParam statisticsQu... |
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
statisticsQueryParam.setStoreId(storeId);
Double price = refundOrderStatisticsService.getRefundOrderStatisticsPrice(statisticsQueryParam);
return ResultUtil.data(price);
| 223 | 74 | 297 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/security/StoreAuthenticationFilter.java | StoreAuthenticationFilter | getAuthentication | class StoreAuthenticationFilter extends BasicAuthenticationFilter {
private final Cache cache;
private final StoreTokenGenerate storeTokenGenerate;
private final StoreMenuRoleService storeMenuRoleService;
private final ClerkService clerkService;
public StoreAuthenticationFilter(AuthenticationMa... |
try {
Claims claims
= Jwts.parser()
.setSigningKey(SecretKeyUtil.generalKeyByDecoders())
.parseClaimsJws(jwt).getBody();
//获取存储在claims中的用户信息
String json = claims.get(SecurityEnum.USER_CONTEXT.getValue()).toString()... | 1,186 | 364 | 1,550 | <no_super_class> |
lilishop_lilishop | lilishop/seller-api/src/main/java/cn/lili/security/StoreSecurityConfig.java | StoreSecurityConfig | configure | class StoreSecurityConfig extends WebSecurityConfigurerAdapter {
/**
* 忽略验权配置
*/
@Autowired
private IgnoredUrlsProperties ignoredUrlsProperties;
/**
* spring security -》 权限不足处理
*/
@Autowired
private CustomAccessDeniedHandler accessDeniedHandler;
@Autowired
private ... |
ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry = http
.authorizeRequests();
//配置的url 不需要授权
for (String url : ignoredUrlsProperties.getUrls()) {
registry.antMatchers(url).permitAll();
}
registry.and()
... | 190 | 330 | 520 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cdi-jakarta/src/main/java/liquibase/integration/jakarta/cdi/CDIBootstrap.java | CDIBootstrap | afterBeanDiscovery | class CDIBootstrap implements Extension {
private Bean<CDILiquibase> instance;
void afterBeanDiscovery(@Observes AfterBeanDiscovery abd, BeanManager bm) {<FILL_FUNCTION_BODY>}
void afterDeploymentValidation(@Observes AfterDeploymentValidation event, BeanManager manager) {
try {
ma... |
instance = new Bean<CDILiquibase>() {
final AnnotatedType<CDILiquibase> at = bm.createAnnotatedType(CDILiquibase.class);
final InjectionTarget<CDILiquibase> it = bm.getInjectionTargetFactory(at).createInjectionTarget(this);
@Override
public Set<Type... | 144 | 619 | 763 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cdi-jakarta/src/main/java/liquibase/integration/jakarta/cdi/CDILiquibase.java | CDILiquibase | createLiquibase | class CDILiquibase implements Extension {
@Inject
@LiquibaseType
ResourceAccessor resourceAccessor;
@Inject
@LiquibaseType
protected CDILiquibaseConfig config;
@Inject
@LiquibaseType
private DataSource dataSource;
private boolean initialized;
private boolean updateSuccessf... |
Liquibase liquibase = new Liquibase(config.getChangeLog(), resourceAccessor, createDatabase(c));
if (config.getParameters() != null) {
for (Map.Entry<String, String> entry : config.getParameters().entrySet()) {
liquibase.setChangeLogParameter(entry.getKey(), entry.getValue()... | 950 | 129 | 1,079 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cdi-jakarta/src/main/java/liquibase/integration/jakarta/cdi/SchemesTreeBuilder.java | SchemaNode | build | class SchemaNode {
private final LiquibaseSchema item;
private final Collection<SchemaNode> children = new ArrayList<>();
public SchemaNode(LiquibaseSchema item) {
this.item = item;
}
public LiquibaseSchema getItem() {
return item;
}
pu... |
log.fine(String.format("[id = %s] build(%s)", id, schemes));
log.info(String.format("[id = %s] Sorting schemes according dependencies...", id));
if (schemes.isEmpty()) {
return Collections.emptyList();
}
SchemaNode root = null;
// first, copy schemes to n... | 493 | 1,296 | 1,789 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cdi/src/main/java/liquibase/integration/cdi/CDIBootstrap.java | CDIBootstrap | afterBeanDiscovery | class CDIBootstrap implements Extension {
private Bean<CDILiquibase> instance;
void afterBeanDiscovery(@Observes AfterBeanDiscovery abd, BeanManager bm) {<FILL_FUNCTION_BODY>}
void afterDeploymentValidation(@Observes AfterDeploymentValidation event, BeanManager manager) {
try {
ma... |
AnnotatedType<CDILiquibase> at = bm.createAnnotatedType(CDILiquibase.class);
final InjectionTarget<CDILiquibase> it = bm.createInjectionTarget(at);
instance = new Bean<CDILiquibase>() {
@Override
public Set<Type> getTypes() {
Set<Type> types = new HashSe... | 145 | 628 | 773 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cdi/src/main/java/liquibase/integration/cdi/CDILiquibase.java | CDILiquibase | performUpdate | class CDILiquibase implements Extension {
@Inject
@LiquibaseType
ResourceAccessor resourceAccessor;
@Inject
@LiquibaseType
protected CDILiquibaseConfig config;
@Inject
@LiquibaseType
private DataSource dataSource;
private boolean initialized;
private boolean updateSuccessf... |
Connection c = null;
Liquibase liquibase = null;
try {
c = dataSource.getConnection();
liquibase = createLiquibase(c);
liquibase.update(new Contexts(config.getContexts()), new LabelExpression(config.getLabels()));
updateSuccessful = true;
... | 910 | 230 | 1,140 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cdi/src/main/java/liquibase/integration/cdi/SchemesTreeBuilder.java | SchemaNode | find | class SchemaNode {
private final LiquibaseSchema item;
private final Collection<SchemaNode> children = new ArrayList<>();
public SchemaNode(LiquibaseSchema item) {
this.item = item;
}
public LiquibaseSchema getItem() {
return item;
}
pu... |
SchemaNode result = null;
if (this.item.name().equals(name)) {
result = this;
} else {
for (SchemaNode child : children) {
SchemaNode found = child.find(name);
if ((result == null) && (found != null)) {
... | 251 | 157 | 408 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cli/src/main/java/liquibase/integration/commandline/CommandLineArgumentValueProvider.java | CommandLineArgumentValueProvider | keyMatches | class CommandLineArgumentValueProvider extends AbstractMapConfigurationValueProvider {
private final SortedMap<String, Object> argumentValues = new TreeMap<>();
public CommandLineArgumentValueProvider(CommandLine.ParseResult parseResult) {
while (parseResult != null) {
for (CommandLine.Mod... |
storedKey = String.valueOf(storedKey).replaceFirst("^--", "");
if (super.keyMatches(wantedKey, storedKey)) {
return true;
}
if (wantedKey.startsWith("liquibase.command.")) {
return super.keyMatches(wantedKey.replaceFirst("^liquibase\\.command\\.", ""), storedKey... | 239 | 136 | 375 | <methods>public non-sealed void <init>() ,public transient liquibase.configuration.ProvidedValue getProvidedValue(java.lang.String[]) <variables>private final Map<java.lang.String,liquibase.configuration.ProvidedValue> knownValues,private int knownValuesForHash,private final java.util.concurrent.locks.Lock knownValuesL... |
liquibase_liquibase | liquibase/liquibase-cli/src/main/java/liquibase/integration/commandline/CommandRunner.java | CommandRunner | call | class CommandRunner implements Callable<CommandResults> {
private CommandLine.Model.CommandSpec spec;
@Override
public CommandResults call() throws Exception {<FILL_FUNCTION_BODY>}
public void setSpec(CommandLine.Model.CommandSpec spec) {
this.spec = spec;
}
} |
List<String> command = new ArrayList<>();
command.add(spec.commandLine().getCommandName());
CommandLine parentCommand = spec.commandLine().getParent();
while (!parentCommand.getCommandName().equals("liquibase")) {
command.add(0, parentCommand.getCommandName());
... | 83 | 557 | 640 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseLauncherSettings.java | LiquibaseLauncherSettings | getSetting | class LiquibaseLauncherSettings {
private static final String LIQUIBASE_HOME_JVM_PROPERTY_NAME = "liquibase.home";
private static final String LIQUIBASE_LAUNCHER_DEBUG_JVM_PROPERTY_NAME = "liquibase.launcher.debug";
private static final String LIQUIBASE_LAUNCHER_PARENT_CLASSLOADER_JVM_PROPERTY_NAME = "liquibase.... |
String value = System.getProperty(setting.getJvmPropertyName());
if (value != null) {
return value;
}
return System.getenv(setting.name());
| 386 | 52 | 438 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-cli/src/main/java/liquibase/integration/commandline/VersionUtils.java | VersionUtils | listLibraries | class VersionUtils {
public static Path getLiquibaseHomePath(Path workingDirectory) throws IOException {
return new File(ObjectUtil.defaultIfNull(getSetting(LIQUIBASE_HOME), workingDirectory.toAbsolutePath().toString())).getAbsoluteFile().getCanonicalFile().toPath();
}
public static List<String> li... |
List<Version.Library> mdcLibraries = new ArrayList<>(libraryInfo.size());
List<String> libraries = new ArrayList<>(libraryInfo.size());
for (LibraryInfo info : new TreeSet<>(libraryInfo.values())) {
String filePath = info.file.getCanonicalPath();
if (liquibaseHomePath !... | 1,084 | 335 | 1,419 | <no_super_class> |
liquibase_liquibase | liquibase/liquibase-maven-plugin/src/main/java/org/liquibase/maven/plugins/AbstractLiquibaseChangeLogMojo.java | AbstractLiquibaseChangeLogMojo | getResourceAccessor | class AbstractLiquibaseChangeLogMojo extends AbstractLiquibaseMojo {
/**
* Specifies the directory where Liquibase can find your <i>changelog</i> file. This is an aliases for searchPath
*
* @parameter property="liquibase.changeLogDirectory"
*/
@PropertyElement
protected String changeLogDire... |
List<ResourceAccessor> resourceAccessors = new ArrayList<>();
resourceAccessors.add(new MavenResourceAccessor(cl));
resourceAccessors.add(new DirectoryResourceAccessor(project.getBasedir()));
resourceAccessors.add(new ClassLoaderResourceAccessor(getClass().getClassLoader()));
S... | 1,182 | 191 | 1,373 | <methods>public non-sealed void <init>() ,public void configureFieldsAndValues() throws MojoExecutionException,public boolean databaseConnectionRequired() ,public void execute() throws MojoExecutionException, MojoFailureException,public synchronized Log getLog() ,public void setPassword(java.lang.String) throws java.la... |
liquibase_liquibase | liquibase/liquibase-maven-plugin/src/main/java/org/liquibase/maven/plugins/AbstractLiquibaseFlowMojo.java | AbstractLiquibaseFlowMojo | performLiquibaseTask | class AbstractLiquibaseFlowMojo extends AbstractLiquibaseMojo {
/**
* Specifies the <i>flowFile</i> to use. If not specified, the default
* checks will be used and no file will be created.
*
* @parameter property="liquibase.flowFile"
*/
@PropertyElement
protected String flowFile;
... |
CommandScope liquibaseCommand = new CommandScope(getCommandName());
liquibaseCommand.addArgumentValue("flowFile", flowFile);
liquibaseCommand.addArgumentValue("flowIntegration", "maven");
if (flowCommandArguments != null) {
FlowCommandArgumentValueProvider flowCommandArgumen... | 289 | 194 | 483 | <methods>public non-sealed void <init>() ,public void configureFieldsAndValues() throws MojoExecutionException,public boolean databaseConnectionRequired() ,public void execute() throws MojoExecutionException, MojoFailureException,public synchronized Log getLog() ,public void setPassword(java.lang.String) throws java.la... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.