|
|
@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import org.apache.commons.lang.RandomStringUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
@ -173,6 +174,17 @@ public class AdminService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void saveApp(MatrixApp app) { |
|
|
|
if (app.getCode() != null) { |
|
|
|
appMapper.updateNameOrUrl(app); |
|
|
|
} else { |
|
|
|
app.setCode(RandomStringUtils.randomAlphabetic(10)); |
|
|
|
app.setSecret(RandomStringUtils.randomAlphabetic(32)); |
|
|
|
app.setIncome(0L); |
|
|
|
appMapper.insert(app); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public OverviewBo incomeOverview(int adminId, String code) { |
|
|
|
if (StringUtils.hasText(code)) { |
|
|
|
MatrixApp app = appMapper.queryByCode(code); |
|
|
|