parent
ce8acad9b2
commit
fc2b79067a
@ -0,0 +1,18 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.domain.repository;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public interface ApsNoticeClientRepository {
|
||||||
|
void saveApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||||
|
|
||||||
|
void updateApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||||
|
|
||||||
|
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
|
||||||
|
|
||||||
|
void updateApsNoticeClientByPartnerCode(Date modifyTime, String modifier, String partnerCode);
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.domain.repository;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.web.command.AddNoticeCommand;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ApsNoticeRepository {
|
||||||
|
PageList<JSONObject> getApsNotices(PageBounds pageBounds);
|
||||||
|
|
||||||
|
ApsNotice saveApsNotice(ApsNotice apsNotice);
|
||||||
|
|
||||||
|
void updateApsNotice(ApsNotice apsNotice);
|
||||||
|
|
||||||
|
ApsNotice getApsNoticesById(String id);
|
||||||
|
|
||||||
|
List<JSONObject> getApsNotice(String id);
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.domain.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
|
||||||
|
public interface ApsNoticeClientsService {
|
||||||
|
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.domain.service;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.web.command.AddNoticeCommand;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
|
||||||
|
public interface ApsNoticeService {
|
||||||
|
PageList<JSONObject> getApsNotices(PageBounds pageBounds);
|
||||||
|
|
||||||
|
void saveApsNotice(JSONObject manager, AddNoticeCommand addNoticeCommand);
|
||||||
|
|
||||||
|
void stopApsNotice(JSONObject manager, String id);
|
||||||
|
|
||||||
|
void updateApsNoticeClient(JSONObject manager, ApsNoticeClient apsNoticeClient);
|
||||||
|
|
||||||
|
AddNoticeCommand getApsNotice(String id);
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.domain.service.Impl;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeClientRepository;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeClientsService;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ApsNoticeClientsServiceImpl implements ApsNoticeClientsService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApsNoticeClientRepository apsNoticeClientRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds) {
|
||||||
|
return apsNoticeClientRepository.getApsNoticeClients(id, pageBounds);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.domain.service.Impl;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeClientRepository;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeRepository;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeService;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.web.command.AddNoticeCommand;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ApsNoticeServiceImpl implements ApsNoticeService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApsNoticeRepository apsNoticeRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApsNoticeClientRepository apsNoticeClientRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageList<JSONObject> getApsNotices(PageBounds pageBounds) {
|
||||||
|
return apsNoticeRepository.getApsNotices(pageBounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveApsNotice(JSONObject manager, AddNoticeCommand addNoticeCommand) {
|
||||||
|
// 保存消息数据
|
||||||
|
ApsNotice saveApsNotice = addNoticeCommand.saveApsNotice(addNoticeCommand, manager);
|
||||||
|
ApsNotice apsNotice = apsNoticeRepository.saveApsNotice(saveApsNotice);
|
||||||
|
for (String partnerCode : addNoticeCommand.getPartnerCodes()) {
|
||||||
|
if (partnerCode != "" || partnerCode != null) {
|
||||||
|
apsNoticeClientRepository.updateApsNoticeClientByPartnerCode(new Date(), manager.getString("manager_id"), partnerCode);
|
||||||
|
ApsNoticeClient apsNoticeClient = addNoticeCommand.saveApsNoticeClient(partnerCode, manager, apsNotice.getId());
|
||||||
|
apsNoticeClientRepository.saveApsNoticeClient(apsNoticeClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stopApsNotice(JSONObject manager, String id) {
|
||||||
|
ApsNotice apsNotice = apsNoticeRepository.getApsNoticesById(id);
|
||||||
|
apsNotice.setStatus(1)
|
||||||
|
.setModifier(manager.getString("manager_id"))
|
||||||
|
.setModifyTime(new Date());
|
||||||
|
apsNoticeRepository.updateApsNotice(apsNotice);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateApsNoticeClient(JSONObject manager, ApsNoticeClient apsNoticeClient) {
|
||||||
|
apsNoticeClient.setModifier(manager.getString("manager_id"));
|
||||||
|
apsNoticeClient.setModifyTime(new Date());
|
||||||
|
apsNoticeClientRepository.updateApsNoticeClient(apsNoticeClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AddNoticeCommand getApsNotice(String id) {
|
||||||
|
List<JSONObject> apsNotice = apsNoticeRepository.getApsNotice(id);
|
||||||
|
AddNoticeCommand addNoticeCommand = new AddNoticeCommand();
|
||||||
|
ArrayList<String> codes = new ArrayList<>();
|
||||||
|
for (JSONObject a : apsNotice) {
|
||||||
|
addNoticeCommand.setTitle(a.getString("title"));
|
||||||
|
addNoticeCommand.setContent(a.getString("content"));
|
||||||
|
codes.add(a.getString("partner_code"));
|
||||||
|
}
|
||||||
|
addNoticeCommand.setPartnerCodes(codes.toArray(new String[codes.size()]));
|
||||||
|
return addNoticeCommand;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.infrastructure.repository;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeClientRepository;
|
||||||
|
import au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeClientMapper;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class ApsNoticeClientRepositoryImpl implements ApsNoticeClientRepository {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApsNoticeClientMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveApsNoticeClient(ApsNoticeClient apsNoticeClient) {
|
||||||
|
mapper.saveApsNoticeClient(apsNoticeClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateApsNoticeClient(ApsNoticeClient apsNoticeClient) {
|
||||||
|
mapper.updateApsNoticeClient(apsNoticeClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds) {
|
||||||
|
return mapper.getApsNoticeClients(id, pageBounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateApsNoticeClientByPartnerCode(Date modifyTime, String modifier, String partnerCode) {
|
||||||
|
mapper.updateApsNoticeClientByPartnerCode(modifyTime, modifier, partnerCode);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.infrastructure.repository;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeRepository;
|
||||||
|
import au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeMapper;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class ApsNoticeRepositoryImpl implements ApsNoticeRepository {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApsNoticeMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageList<JSONObject> getApsNotices(PageBounds pageBounds) {
|
||||||
|
return mapper.getApsNotices(pageBounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApsNotice saveApsNotice(ApsNotice apsNotice) {
|
||||||
|
mapper.saveApsNotice(apsNotice);
|
||||||
|
return mapper.getApsNoticesById(apsNotice.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateApsNotice(ApsNotice apsNotice) {
|
||||||
|
mapper.updateApsNotice(apsNotice);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApsNotice getApsNoticesById(String id) {
|
||||||
|
return mapper.getApsNoticesById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<JSONObject> getApsNotice(String id) {
|
||||||
|
return mapper.getApsNotice(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.web;
|
||||||
|
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeClientsService;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeService;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.web.command.AddNoticeCommand;
|
||||||
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
||||||
|
import au.com.royalpay.payment.tools.CommonConsts;
|
||||||
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
||||||
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/aps/kyc")
|
||||||
|
public class RestApsKYCController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ApsNoticeService apsNoticeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ApsNoticeClientsService apsNoticeClientsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取消息通知列表
|
||||||
|
*
|
||||||
|
* @param page 当前页
|
||||||
|
* @param pageSize 每页数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ManagerMapping(value = "/notices", method = RequestMethod.GET, role = {ManagerRole.ADMIN})
|
||||||
|
public JSONObject getApsNotices(@RequestParam(value = "page", defaultValue = "1") int page,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
||||||
|
PageBounds pageBounds = new PageBounds(page, pageSize);
|
||||||
|
PageList<JSONObject> apply = apsNoticeService.getApsNotices(pageBounds);
|
||||||
|
return PageListUtils.buildPageListResult(apply);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ManagerMapping(value = "/notice", method = RequestMethod.GET, role = {ManagerRole.ADMIN})
|
||||||
|
public AddNoticeCommand getApsNotice(@RequestParam String id) {
|
||||||
|
return apsNoticeService.getApsNotice(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取消息通知商户列表
|
||||||
|
*
|
||||||
|
* @param page 当前页
|
||||||
|
* @param pageSize 每页数
|
||||||
|
* @param id 消息id
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
@ManagerMapping(value = "/notice/clients", method = RequestMethod.GET, role = {ManagerRole.ADMIN})
|
||||||
|
public JSONObject getApsNoticeClients(@RequestParam(value = "page", defaultValue = "1") int page,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") int pageSize,
|
||||||
|
@RequestParam String id) {
|
||||||
|
PageBounds pageBounds = new PageBounds(page, pageSize);
|
||||||
|
PageList<JSONObject> apply = apsNoticeClientsService.getApsNoticeClients(id, pageBounds);
|
||||||
|
return PageListUtils.buildPageListResult(apply);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增消息通知
|
||||||
|
*
|
||||||
|
* @param manager 运营用户
|
||||||
|
* @param addNoticeCommand 新增数据
|
||||||
|
*/
|
||||||
|
@ManagerMapping(value = "/notice", method = RequestMethod.POST, role = {ManagerRole.ADMIN})
|
||||||
|
public void addApsNotice(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody AddNoticeCommand addNoticeCommand) {
|
||||||
|
apsNoticeService.saveApsNotice(manager, addNoticeCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用消息
|
||||||
|
*
|
||||||
|
* @param manager 运营用户
|
||||||
|
* @param id 消息数据
|
||||||
|
*/
|
||||||
|
@ManagerMapping(value = "/notice", method = RequestMethod.PUT, role = {ManagerRole.ADMIN})
|
||||||
|
public void stopApsNotice(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody String id) {
|
||||||
|
apsNoticeService.stopApsNotice(manager, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停用商户
|
||||||
|
*
|
||||||
|
* @param manager 运营数据
|
||||||
|
* @param apsNoticeClient 消息关联商户数据
|
||||||
|
*/
|
||||||
|
@ManagerMapping(value = "/notice/client", method = RequestMethod.PUT, role = {ManagerRole.ADMIN})
|
||||||
|
public void updateApsNoticeClient(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody ApsNoticeClient apsNoticeClient) {
|
||||||
|
apsNoticeService.updateApsNoticeClient(manager, apsNoticeClient);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.web.command;
|
||||||
|
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AddNoticeCommand {
|
||||||
|
|
||||||
|
private String[] partnerCodes;
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
public ApsNotice saveApsNotice(AddNoticeCommand addNoticeDescriptor, JSONObject manager) {
|
||||||
|
return new ApsNotice()
|
||||||
|
.setCreateTime(new Date())
|
||||||
|
.setCreator(manager.getString("manager_id"))
|
||||||
|
.setTitle(addNoticeDescriptor.getTitle())
|
||||||
|
.setContent(addNoticeDescriptor.getContent());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApsNoticeClient saveApsNoticeClient(String partnerCode,JSONObject manager,String noticeId){
|
||||||
|
return new ApsNoticeClient()
|
||||||
|
.setCreateTime(new Date())
|
||||||
|
.setCreator(manager.getString("manager_id"))
|
||||||
|
.setNoticeId(noticeId)
|
||||||
|
.setPartnerCode(partnerCode);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package au.com.royalpay.payment.manage.apsKYC.web.command;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SelectApsNoticeCommand {
|
||||||
|
private int limit = 10;
|
||||||
|
private int page = 1;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package au.com.royalpay.payment.manage.mappers.apskyc;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
|
||||||
|
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
|
||||||
|
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@AutoMapper(tablename = "sys_aps_notice_clients", pkName = "id")
|
||||||
|
public interface ApsNoticeClientMapper {
|
||||||
|
|
||||||
|
@AutoSql(SqlType.INSERT)
|
||||||
|
void saveApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||||
|
|
||||||
|
@AutoSql(SqlType.UPDATE)
|
||||||
|
void updateApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||||
|
|
||||||
|
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
|
||||||
|
|
||||||
|
void updateApsNoticeClientByPartnerCode(@Param("modify_time") Date modifyTime, @Param("modifier") String modifier, @Param("partner_code") String partnerCode);
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package au.com.royalpay.payment.manage.mappers.apskyc;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||||
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||||
|
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
|
||||||
|
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
|
||||||
|
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@AutoMapper(tablename = "sys_aps_notice", pkName = "id")
|
||||||
|
public interface ApsNoticeMapper {
|
||||||
|
PageList<JSONObject> getApsNotices(PageBounds pageBounds);
|
||||||
|
|
||||||
|
@AutoSql(SqlType.INSERT)
|
||||||
|
void saveApsNotice(ApsNotice apsNotice);
|
||||||
|
|
||||||
|
@AutoSql(SqlType.SELECT)
|
||||||
|
ApsNotice getApsNoticesById(String id);
|
||||||
|
|
||||||
|
@AutoSql(SqlType.UPDATE)
|
||||||
|
void updateApsNotice(ApsNotice apsNotice);
|
||||||
|
|
||||||
|
List<JSONObject> getApsNotice(String id);
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeClientMapper">
|
||||||
|
<update id="updateApsNoticeClientByPartnerCode">
|
||||||
|
UPDATE sys_aps_notice_clients
|
||||||
|
SET modifier = #{modifier},
|
||||||
|
modify_time = #{modify_time},
|
||||||
|
is_valid = 1
|
||||||
|
WHERE partner_code = #{partner_code}
|
||||||
|
</update>
|
||||||
|
<select id="getApsNoticeClients" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT *
|
||||||
|
FROM sys_aps_notice_clients
|
||||||
|
where notice_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeMapper">
|
||||||
|
<select id="getApsNotices"
|
||||||
|
resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT n.id,
|
||||||
|
n.create_time createTime,
|
||||||
|
n.title,
|
||||||
|
n.content,
|
||||||
|
n.status,
|
||||||
|
count(c.id) clientsNum,
|
||||||
|
sum(IF(c.`status` = 0, 1, 0)) noRead,
|
||||||
|
sum(IF(c.`status` = 2, 1, 0)) agree,
|
||||||
|
sum(IF(c.handle = 1, 1, 0)) handleNum
|
||||||
|
FROM sys_aps_notice n
|
||||||
|
INNER JOIN sys_aps_notice_clients c
|
||||||
|
ON n.id = c.notice_id
|
||||||
|
GROUP BY c.notice_id
|
||||||
|
ORDER BY n.create_time DESC
|
||||||
|
</select>
|
||||||
|
<select id="getApsNotice" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT n.title, n.content, c.partner_code
|
||||||
|
FROM sys_aps_notice n
|
||||||
|
INNER JOIN sys_aps_notice_clients c ON c.notice_id = n.id
|
||||||
|
where n.id = #{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,87 @@
|
|||||||
|
<section class="content-header">
|
||||||
|
<h1>新增A+KYC通知</h1>
|
||||||
|
</section>
|
||||||
|
<div class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<form novalidate name="addNoticeFrom">
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':addNoticeFrom.partner_code.$invalid && addNoticeFrom.partner_code.$dirty}">
|
||||||
|
<label class="control-label col-sm-2" for="partner_code_input">* 商户编码</label>
|
||||||
|
<div class="col-xs-10">
|
||||||
|
<textarea
|
||||||
|
id="partner_code_input"
|
||||||
|
rows="5"
|
||||||
|
style="width: 100%;resize:none;"
|
||||||
|
required
|
||||||
|
name="partner_code"
|
||||||
|
placeholder="请输入商户编码(逗号隔开)"
|
||||||
|
ng-model="saveNoticeData.partnerCodes">
|
||||||
|
</textarea>
|
||||||
|
<div ng-messages="addNoticeFrom.partner_code.$error"
|
||||||
|
ng-if="addNoticeFrom.partner_code.$dirty">
|
||||||
|
<p class="small text-danger"
|
||||||
|
ng-message="required">required field
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':addNoticeFrom.title.$invalid && addNoticeFrom.title.$dirty}">
|
||||||
|
<label class="control-label col-sm-2" for="title_input">* 通知标题</label>
|
||||||
|
<div class="col-xs-10">
|
||||||
|
<input type="text"
|
||||||
|
id="title_input"
|
||||||
|
required
|
||||||
|
style="width: 100%"
|
||||||
|
name="title"
|
||||||
|
placeholder="请输入通知标题"
|
||||||
|
ng-model="saveNoticeData.title">
|
||||||
|
<div ng-messages="addNoticeFrom.title.$error"
|
||||||
|
ng-if="addNoticeFrom.title.$dirty">
|
||||||
|
<p class="small text-danger"
|
||||||
|
ng-message="required">required field
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':addNoticeFrom.content.$invalid && addNoticeFrom.content.$dirty}">
|
||||||
|
<label class="control-label col-sm-2" for="content_input">* 通知内容</label>
|
||||||
|
<div class="col-xs-10">
|
||||||
|
<ueditor id="content_input" name="content" required ng-model="saveNoticeData.content" ue-height="400"></ueditor>
|
||||||
|
<div ng-messages="addNoticeFrom.content.$error"
|
||||||
|
ng-if="addNoticeFrom.content.$dirty">
|
||||||
|
<p class="small text-danger"
|
||||||
|
ng-message="required">required field
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="margin-bottom margin-top" style="text-align: right">
|
||||||
|
<a role="button"
|
||||||
|
style="margin-left: 10px;"
|
||||||
|
ng-click="$dismiss()"
|
||||||
|
class="btn btn-danger">cancel
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="button"
|
||||||
|
id="save-risk-btn"
|
||||||
|
ng-click="saveNotice(addNoticeFrom)">Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,149 @@
|
|||||||
|
<section class="content-header">
|
||||||
|
<h1>A+KYC通知</h1>
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-sitemap"></i> Compliance Management
|
||||||
|
</li>
|
||||||
|
<li class="active">A+KYC通知</li>
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="box box-warning" style="margin-top: 30px;">
|
||||||
|
<div class="box-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<button class="btn btn-success" style="float: right" type="button" ng-click="addNotice()">
|
||||||
|
<i class="fa fa-plus"></i> 新增
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<br/><br/>
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-bordered table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>通知时间</th>
|
||||||
|
<th>通知标题</th>
|
||||||
|
<th>通知内容</th>
|
||||||
|
<th>通知商户数</th>
|
||||||
|
<th>未读数</th>
|
||||||
|
<th>同意数</th>
|
||||||
|
<th>合规处理数</th>
|
||||||
|
<th style="text-align: center">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr ng-repeat="item in apply">
|
||||||
|
<td>{{ item.createTime }}</td>
|
||||||
|
<td>{{ item.title }}</td>
|
||||||
|
<td style="width: 300px;">
|
||||||
|
<div style="max-width: 300px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">
|
||||||
|
{{ item.content }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>{{ item.clientsNum }}
|
||||||
|
<a href="" type="button">
|
||||||
|
<i class="fa fa-bars" aria-hidden="true"
|
||||||
|
ng-click="getNoticeClients(item.title,item.id,1)"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>{{ item.noRead }}</td>
|
||||||
|
<td>{{ item.agree }}</td>
|
||||||
|
<td>{{ item.handleNum }}</td>
|
||||||
|
<td style="text-align: center">
|
||||||
|
<a href="" type="button">
|
||||||
|
<i ng-if="item.status == 0" class="fa fa-times" style="color: red"
|
||||||
|
ng-click="stopNotice(item.id)"> 禁用</i>
|
||||||
|
<i ng-if="item.status == 1" readonly class="fa fa-times"
|
||||||
|
style="color: #727272"> 已禁用</i>
|
||||||
|
</a>
|
||||||
|
<span> | </span>
|
||||||
|
<a href="" type="button">
|
||||||
|
<i class="fa fa-file-text-o" ng-click="catNotice(item.id)"> 详情</i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<uib-pagination ng-if="apply.length"
|
||||||
|
class="pagination"
|
||||||
|
total-items="pagination.totalCount"
|
||||||
|
boundary-links="true"
|
||||||
|
ng-model="pagination.page"
|
||||||
|
items-per-page="pagination.limit"
|
||||||
|
max-size="10"
|
||||||
|
ng-change="loadApsNotice()"
|
||||||
|
previous-text="‹"
|
||||||
|
next-text="›"
|
||||||
|
first-text="«"
|
||||||
|
last-text="»"></uib-pagination>
|
||||||
|
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box box-danger" ng-if="showClients">
|
||||||
|
<div class="modal-body">
|
||||||
|
<h3>{{clientTitle}}—商户列表</h3>
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-bordered table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>商户名称</th>
|
||||||
|
<th style="text-align: center">用户状态</th>
|
||||||
|
<th style="text-align: center">运营操作</th>
|
||||||
|
<th style="text-align: center">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr ng-repeat="item in noticeClients">
|
||||||
|
<td>{{item.partner_code}}</td>
|
||||||
|
<td style="text-align: center">
|
||||||
|
<span ng-if="item.status == 0" style="color: black">未读</span>
|
||||||
|
<span ng-if="item.status == 1" style="color: #c09d03">已读</span>
|
||||||
|
<span ng-if="item.status == 2" style="color: #00a65a">同意</span>
|
||||||
|
<span ng-if="item.status == 3" style="color: red">拒绝</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center">
|
||||||
|
<a href="" type="button"><span ng-if="item.handle == 0">未处理 | <i class="fa fa-check"
|
||||||
|
aria-hidden="true"></i></span></a>
|
||||||
|
<span ng-if="item.handle == 1" style="color: #00a65a" ng-click="setHandle(item.id)">已处理</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center">
|
||||||
|
<a href="" type="button">
|
||||||
|
<i ng-if="item.is_valid == 0" class="fa fa-times" style="color: red"
|
||||||
|
ng-click="stopNoticeClient(item.id)">禁用</i>
|
||||||
|
</a>
|
||||||
|
<i ng-if="item.is_valid == 1" readonly class="fa fa-times"
|
||||||
|
style="color: #727272">已禁用</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<uib-pagination ng-if="noticeClients.length"
|
||||||
|
class="pagination"
|
||||||
|
total-items="clientPagination.totalCount"
|
||||||
|
boundary-links="true"
|
||||||
|
ng-model="clientPagination.page"
|
||||||
|
items-per-page="clientPagination.limit"
|
||||||
|
max-size="10"
|
||||||
|
ng-change="loadApsNoticeClients()"
|
||||||
|
previous-text="‹"
|
||||||
|
next-text="›"
|
||||||
|
first-text="«"
|
||||||
|
last-text="»"></uib-pagination>
|
||||||
|
<div class="col-xs-12">Total Records:{{clientPagination.totalCount}};Total Pages:{{clientPagination.totalPages}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,46 @@
|
|||||||
|
<section class="content-header">
|
||||||
|
<h1>A+KYC通知详情</h1>
|
||||||
|
</section>
|
||||||
|
<div class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2">* 商户编码</label>
|
||||||
|
<div class="col-xs-10">
|
||||||
|
<span>{{ noticeDetail.partnerCodes }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2">* 通知标题</label>
|
||||||
|
<div class="col-xs-10">
|
||||||
|
<span>{{ noticeDetail.title }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2">* 通知内容</label>
|
||||||
|
<div class="col-xs-10">
|
||||||
|
<div style="border:1px solid #000000" id="input"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="margin-bottom margin-top" style="text-align: right">
|
||||||
|
<a role="button"
|
||||||
|
style="margin-left: 10px;"
|
||||||
|
ng-click="$dismiss()"
|
||||||
|
class="btn btn-danger">cancel
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 1.6 KiB |
Loading…
Reference in new issue