eason.qian 7 years ago
parent 2e3ab4a7f0
commit d99cdd94e0

@ -236,4 +236,16 @@ alter table statistics_customer_order add column refund_orders int(10) DEFAULT N
alter table statistics_customer_order add column refund_amount DECIMAL(20,2) DEFAULT NULL COMMENT '' AFTER `total`;
ALTER TABLE `financial_bd_prize_log`
MODIFY COLUMN `manager_id` varchar(50) NOT NULL COMMENT 'bd user id' AFTER `record_id`;
MODIFY COLUMN `manager_id` varchar(50) NOT NULL COMMENT 'bd user id' AFTER `record_id`;
CREATE TABLE `act_app_list` (
`act_id` varchar(50) NOT NULL,
`act_name` varchar(100) NOT NULL COMMENT '活动名称',
`act_url` varchar(400) DEFAULT NULL COMMENT '活动链接',
`is_valid` tinyint(1) NOT NULL DEFAULT 1,
`parms_json` text DEFAULT NULL COMMENT '活动参数',
`create_time` datetime DEFAULT NULL,
`desc` varchar(400) DEFAULT NULL COMMENT '活动简介',
PRIMARY KEY (`act_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='app活动'

@ -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();
}
}

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.appclient.web;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.activities.app_index.core.AppActService;
import au.com.royalpay.payment.manage.activities.monsettledelay.core.ActMonDelaySettleService;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppQueryBean;
@ -52,6 +53,8 @@ public class RetailAppController {
private BillService billService;
@Resource
private ActMonDelaySettleService actMonDelaySettleService;
@Resource
private AppActService appActService;
@RequestMapping(value = "/token", method = RequestMethod.PUT)
public void updateDevToken(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject token) {
@ -329,8 +332,8 @@ public class RetailAppController {
@RequestMapping(value = "/act",method = RequestMethod.GET)
public JSONObject getIndexAct(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device){
return actMonDelaySettleService.getActNotice(device);
public List<JSONObject> getIndexAct(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device){
return appActService.listAppActs();
}
@RequestMapping(value = "/act/mondelay/desc", method = RequestMethod.GET)

@ -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…
Cancel
Save