parent
2e3ab4a7f0
commit
d99cdd94e0
@ -0,0 +1,9 @@
|
||||
package au.com.royalpay.payment.manage.activities.app_index.core;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AppActService {
|
||||
List<JSONObject> listAppActs();
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package au.com.royalpay.payment.manage.activities.app_index.core.impls;
|
||||
|
||||
import au.com.royalpay.payment.manage.activities.app_index.core.AppActService;
|
||||
import au.com.royalpay.payment.manage.mappers.act.ActAppMapper;
|
||||
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AppActServiceImp implements AppActService {
|
||||
|
||||
@Resource
|
||||
private ActAppMapper actAppMapper;
|
||||
|
||||
@Override
|
||||
public List<JSONObject> listAppActs(){
|
||||
List<JSONObject> list = actAppMapper.listActs();
|
||||
for (JSONObject act:list){
|
||||
String url = act.getString("act_url");
|
||||
act.put("act_url", PlatformEnvironment.getEnv().concatUrl(url));
|
||||
}
|
||||
return actAppMapper.listActs();
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package au.com.royalpay.payment.manage.mappers.act;
|
||||
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AutoMapper(tablename = "act_app_list", pkName = "act_id")
|
||||
public interface ActAppMapper {
|
||||
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
@AdvanceSelect(addonWhereClause = "is_valid=1")
|
||||
List<JSONObject> listActs ();
|
||||
}
|
Loading…
Reference in new issue