|
@@ -14,6 +14,7 @@ import com.book.dao.cpsshard.mapper.UserRecentlyReadMapper;
|
|
|
import com.book.dao.cpsshard.pojo.example.ConsumeExample;
|
|
|
import com.book.dao.cps.pojo.example.RechargeExample;
|
|
|
import com.book.dao.cpsshard.pojo.example.UserRecentlyReadExample;
|
|
|
+import com.book.server.annotation.CacheFind;
|
|
|
import com.book.server.common.entity.Result;
|
|
|
import com.book.server.common.entity.ResultCode;
|
|
|
import com.book.dao.utils.DateUtils;
|
|
@@ -250,6 +251,8 @@ public class BookServiceImpl implements BookService {
|
|
|
|
|
|
@Autowired
|
|
|
private ConfigMapper configMapper;
|
|
|
+ @Autowired
|
|
|
+ private AdminConfigMapper adminConfigMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private ConsumeMapper consumeMapper;
|
|
@@ -843,4 +846,19 @@ public class BookServiceImpl implements BookService {
|
|
|
public Integer getFreeCoin(Long id) {
|
|
|
return getFreeCountFromCharges(getFreeCharges(id));
|
|
|
}
|
|
|
+
|
|
|
+ public Integer getBook_guide_chapter_idx(String appId, Integer bookId) {
|
|
|
+ Config config = configMapper.selectByName("book_guide_chapter_idx");
|
|
|
+ return Integer.valueOf(config.getValue());
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getQrcodeUrl(String appId) {
|
|
|
+ AdminConfig adminConfig = adminConfigMapper.selectByAppid(appId);
|
|
|
+ if (adminConfig == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ String json = adminConfig.getJson().toString();
|
|
|
+ AdminConfig.Info info = JsonUtils.getObject(json, AdminConfig.Info.class);
|
|
|
+ return info.getAuthorizer_info().getQrcode_url();
|
|
|
+ }
|
|
|
}
|